Received: from eggs.gnu.org ([2001:4830:134:3::10]:39606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm1dZ-0006Jo-HB for qemu-devel@nongnu.org; Mon, 19 Sep 2016 12:41:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bm1dW-0008MO-E5 for qemu-devel@nongnu.org; Mon, 19 Sep 2016 12:41:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm1dW-0008Ly-7z for qemu-devel@nongnu.org; Mon, 19 Sep 2016 12:41:42 -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 BA397283F2F for ; Mon, 19 Sep 2016 16:41:41 +0000 (UTC) From: Markus Armbruster Date: Mon, 19 Sep 2016 18:41:28 +0200 Message-Id: <1474303294-13952-13-git-send-email-armbru@redhat.com> In-Reply-To: <1474303294-13952-1-git-send-email-armbru@redhat.com> References: <1474303294-13952-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau 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 Message-Id: <20160912091913.15831-13-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- 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.5.5