From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ydmzo-00022O-73 for qemu-devel@nongnu.org; Thu, 02 Apr 2015 17:49:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ydmzk-0005uB-B3 for qemu-devel@nongnu.org; Thu, 02 Apr 2015 17:49:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ydmzk-0005sj-26 for qemu-devel@nongnu.org; Thu, 02 Apr 2015 17:49:48 -0400 Message-ID: <551DB94A.5050304@redhat.com> Date: Thu, 02 Apr 2015 15:48:58 -0600 From: Eric Blake MIME-Version: 1.0 References: <1427995743-7865-1-git-send-email-armbru@redhat.com> <1427995743-7865-3-git-send-email-armbru@redhat.com> In-Reply-To: <1427995743-7865-3-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ev03mdeaSbpknBTRG3DiMU1OW849tT0Qw" Subject: Re: [Qemu-devel] [PATCH RFC 02/19] qapi: Fix C identifiers generated for names containing '.' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, akong@redhat.com, berto@igalia.com, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ev03mdeaSbpknBTRG3DiMU1OW849tT0Qw Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/02/2015 11:28 AM, Markus Armbruster wrote: > c_fun() maps '.' to '_', c_var() doesn't. Nothing prevents '.' in > QAPI names that get passed to c_var(). >=20 > Which QAPI names get passed to c_fun(), to c_var(), or to both is not > obvious. Names of command parameters and struct type members get > passed to c_var(). >=20 > c_var() strips a leading '*', but this cannot happen. c_fun() > doesn't. >=20 > Fix c_var() to work exactly like c_fun(). >=20 > Perhaps they should be replaced by a single mapping function. How much harder is that to do? Also, this commit probably means my qapi testsuite enhancements ought to add tests that we support downstream extensions (__name.name_blah) in a variety of situations. But I'm merely adding it to my (growing) list of post-series additions, and won't hold up v6 adding it. >=20 > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) If it's not too hard to use a single mapping function, that might look prettier. But from the raw perspective of fixing an inconsistency in the code: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ev03mdeaSbpknBTRG3DiMU1OW849tT0Qw 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/ iQEcBAEBCAAGBQJVHblKAAoJEKeha0olJ0NqcYEH/RmpJr5I+4vIvoFZHQsIDV4S 7ZG28f3vACP0CMafQkcrfbvzlTIs6nfi4gwE8vqvtmpwaENnXqdu2nkJZO33ZaGZ 4EfpdorOauUsz36nU8UuBtBLK/rAODr1h83LZzm2kXeXJRGyZZdZBSI20I2jBivD 5JgKERrr0LtiBc+rj9ocQBhRQuVWxmyqjaHTTw7t545ordYk2jeTkiIC+mm+Phpp wwzXDaZtlxIkr5Sb4laFiGyKF4TdIGQciWUqIgyuRL5D86W1c292G63Exfkcu56T WX0yHr0aWT0M5g58wgz2ZcypxCnsohUmeoMuIm+r87PjMtoWlUMQ8nXCYmYD9sU= =j6yU -----END PGP SIGNATURE----- --ev03mdeaSbpknBTRG3DiMU1OW849tT0Qw--