From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjNPG-0002B6-8k for qemu-devel@nongnu.org; Mon, 12 Sep 2016 05:20:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjNPE-0002u9-7W for qemu-devel@nongnu.org; Mon, 12 Sep 2016 05:20:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjNPE-0002u3-1R for qemu-devel@nongnu.org; Mon, 12 Sep 2016 05:20:00 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF4F63B71F for ; Mon, 12 Sep 2016 09:19:59 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 12 Sep 2016 13:19:07 +0400 Message-Id: <20160912091913.15831-13-marcandre.lureau@redhat.com> In-Reply-To: <20160912091913.15831-1-marcandre.lureau@redhat.com> References: <20160912091913.15831-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v6 12/18] qapi: remove the "middle" mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Now that the register function is always generated, we can remove the so-called "middle" mode from the generator script. Signed-off-by: Marc-Andr=C3=A9 Lureau --- scripts/qapi-commands.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index b150db9..eac64ce 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qapi-commands.py @@ -206,8 +206,7 @@ class QAPISchemaGenCommandVisitor(QAPISchemaVisitor): self._visited_ret_types =3D set() =20 def visit_end(self): - if not middle_mode: - self.defn +=3D gen_registry(self._regy) + self.defn +=3D gen_registry(self._regy) self._regy =3D None self._visited_ret_types =3D None =20 @@ -221,18 +220,10 @@ class QAPISchemaGenCommandVisitor(QAPISchemaVisitor= ): self.defn +=3D gen_marshal_output(ret_type) self.decl +=3D gen_marshal_decl(name) self.defn +=3D gen_marshal(name, arg_type, boxed, ret_type) - if not middle_mode: - self._regy +=3D gen_register_command(name, success_response) + self._regy +=3D gen_register_command(name, success_response) =20 =20 -middle_mode =3D False - -(input_file, output_dir, do_c, do_h, prefix, opts) =3D \ - parse_command_line("m", ["middle"]) - -for o, a in opts: - if o in ("-m", "--middle"): - middle_mode =3D True +(input_file, output_dir, do_c, do_h, prefix, opts) =3D parse_command_lin= e() =20 c_comment =3D ''' /* --=20 2.10.0