From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQMsq-000670-Lt for qemu-devel@nongnu.org; Thu, 21 Jul 2016 18:56:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQMsm-0002A0-Dh for qemu-devel@nongnu.org; Thu, 21 Jul 2016 18:55:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQMsm-00029w-59 for qemu-devel@nongnu.org; Thu, 21 Jul 2016 18:55:56 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 9DCB37F099 for ; Thu, 21 Jul 2016 22:55:55 +0000 (UTC) References: <20160721140030.28383-1-marcandre.lureau@redhat.com> <20160721140030.28383-10-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <579152FA.5030704@redhat.com> Date: Thu, 21 Jul 2016 16:55:54 -0600 MIME-Version: 1.0 In-Reply-To: <20160721140030.28383-10-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="U9xM989uFnDoKDM7I7pP4FVg2nqhNriIr" Subject: Re: [Qemu-devel] [PATCH v2 09/12] qapi: remove the "middle" mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --U9xM989uFnDoKDM7I7pP4FVg2nqhNriIr From: Eric Blake To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: armbru@redhat.com Message-ID: <579152FA.5030704@redhat.com> Subject: Re: [PATCH v2 09/12] qapi: remove the "middle" mode References: <20160721140030.28383-1-marcandre.lureau@redhat.com> <20160721140030.28383-10-marcandre.lureau@redhat.com> In-Reply-To: <20160721140030.28383-10-marcandre.lureau@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/21/2016 08:00 AM, marcandre.lureau@redhat.com wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > Now that the register function is always generated, we can > remove the so-called "middle" mode from the generator script. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > scripts/qapi-commands.py | 29 +++++------------------------ > 1 file changed, 5 insertions(+), 24 deletions(-) >=20 > diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py > index a06a2c4..4754ae0 100644 > --- a/scripts/qapi-commands.py > +++ b/scripts/qapi-commands.py > @@ -84,17 +84,8 @@ static void qmp_marshal_output_%(c_name)s(%(c_type)s= ret_in, QObject **ret_out, > =20 > =20 > def gen_marshal_proto(name): > - ret =3D 'void qmp_marshal_%s(QDict *args, QObject **ret, Error **e= rrp)' % c_name(name) > - if not middle_mode: > - ret =3D 'static ' + ret > - return ret > - > - > -def gen_marshal_decl(name): > - return mcgen(''' > -%(proto)s; > -''', > - proto=3Dgen_marshal_proto(name)) > + return 'static void qmp_marshal_%s' % c_name(name) + \ > + '(QDict *args, QObject **ret, Error **errp)' I'm wondering if this should be: return mcgen(''' static void qmp_marshal_%(c_name)s(QDict *args, QObject **ret, Error **er= rp) ''', c_name=3Dc_name(name)) for consistency with our other code (I'm not sure why we weren't already using mcgen(), though). Otherwise, nice to see it go! --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --U9xM989uFnDoKDM7I7pP4FVg2nqhNriIr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXkVL6AAoJEKeha0olJ0NqppgH/jNFzxs6cM7pgf2F8XfS77iJ djwZA5+AdP2+94MRwh/16TLsCAzyv9NeA+fpeDnLeHcCkpjWDRHy7LyMXG80C3x4 g3LtouTtJDY2QAkDWSC6biVQKTBCw8mR+umtyKhkgTbuHBBm9I2iifLQCe87Y3b8 LeEpbZqL3fK9NWl8VeWcRMwfKM8W7UyphRavqOkTEcbPjwhqQT7r6chmXKVXeYZK dkNVRbi0WgJseKwc63OneU9ZhdSeoqjGk8FOIADr+UIMmIDT/q+6AgY/Z38Jo/hD O2POnMz+IkaE2mbHn2MfIYFWGPznUvzf5iwI8AtsrS9xCV+7gG1ucfTCNqJ6qeM= =QRzL -----END PGP SIGNATURE----- --U9xM989uFnDoKDM7I7pP4FVg2nqhNriIr--