From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx6uI-0002bP-Il for qemu-devel@nongnu.org; Tue, 17 Jun 2014 23:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wx6uE-0006Uj-FX for qemu-devel@nongnu.org; Tue, 17 Jun 2014 23:51:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx6uE-0006Tq-5Y for qemu-devel@nongnu.org; Tue, 17 Jun 2014 23:51:26 -0400 Message-ID: <53A10CB9.8010809@redhat.com> Date: Tue, 17 Jun 2014 21:51:21 -0600 From: Eric Blake MIME-Version: 1.0 References: <1402399553-21692-1-git-send-email-akong@redhat.com> <1402399553-21692-3-git-send-email-akong@redhat.com> In-Reply-To: <1402399553-21692-3-git-send-email-akong@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2qIQNFex36C1vwgOGMFDpWBDDUxrhhKBC" Subject: Re: [Qemu-devel] [PATCH v6 2/3] qapi: add const prefix to 'char *' insider c_type() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong , qemu-devel@nongnu.org Cc: lcapitulino@redhat.com, mdroth@linux.vnet.ibm.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2qIQNFex36C1vwgOGMFDpWBDDUxrhhKBC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/10/2014 05:25 AM, Amos Kong wrote: > It's ugly to add const prefix for parameter type by an if statement > outside c_type(). This patch adds a parameter to do it. >=20 > Signed-off-by: Amos Kong > Suggested-by: Markus Armbruster > Reviewed-by: Eric Blake > Reviewed-by: Paolo Bonzini > Reviewed-by: Markus Armbruster > --- > scripts/qapi-commands.py | 4 +--- > scripts/qapi.py | 4 +++- > 2 files changed, 4 insertions(+), 4 deletions(-) Wenchao's series introduces another client that needs this treatment: https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg01225.html Depending on what order things get merged in, you may need followup patches or conflict resolution. >=20 > diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py > index 7d93d01..34f200a 100644 > --- a/scripts/qapi-commands.py > +++ b/scripts/qapi-commands.py > @@ -29,9 +29,7 @@ def type_visitor(name): > def generate_command_decl(name, args, ret_type): > arglist=3D"" > for argname, argtype, optional, structured in parse_args(args): > - argtype =3D c_type(argtype) > - if argtype =3D=3D "char *": > - argtype =3D "const char *" > + argtype =3D c_type(argtype, is_param=3DTrue) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --2qIQNFex36C1vwgOGMFDpWBDDUxrhhKBC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJToQy5AAoJEKeha0olJ0NqDcEH/idK3Z7K8HXirGJ/AatAwT6e yHHMby0wspQp/x148+ew3hapVtJhRANMkA8FE7bs107ZjIKJ2NwIvO20y5sZpJwH TBgMm4IJ3xCjtk8ECWnNYCuuZW4QW9RefgFkQWshWTWbFsWIErTb7CoMpoP8m0OC 8ab9yTadDbIzttSZ9VqBPVhfjghNWBkUDNPWbuWW03RjM8se3XDEEd+YrPj+6GUs Z6tdh8H6UUq+URmF//Uq6shgt+6bUac0wddTjqxiEBTTHPbXRkYljitWmg7JECQB VayjYnUYZr6QyoK1BRJHV1vRFSMXVChkMr1ScbHuFNB4K0WF45kFxD+49jJBNyo= =8Mu7 -----END PGP SIGNATURE----- --2qIQNFex36C1vwgOGMFDpWBDDUxrhhKBC--