From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba4B6-0005o2-N0 for qemu-devel@nongnu.org; Wed, 17 Aug 2016 12:58:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ba4B4-0002gd-R7 for qemu-devel@nongnu.org; Wed, 17 Aug 2016 12:58:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba4B4-0002fy-K6 for qemu-devel@nongnu.org; Wed, 17 Aug 2016 12:58:54 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (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 25E3B81243 for ; Wed, 17 Aug 2016 16:58:54 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 17 Aug 2016 20:57:52 +0400 Message-Id: <20160817165757.23486-16-marcandre.lureau@redhat.com> In-Reply-To: <20160817165757.23486-1-marcandre.lureau@redhat.com> References: <20160817165757.23486-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 v5 15/20] 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.9.0