From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypc3U-0006wb-Ck for qemu-devel@nongnu.org; Tue, 05 May 2015 08:34:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ypc3O-0003fn-Lz for qemu-devel@nongnu.org; Tue, 05 May 2015 08:34:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypc3O-0003fb-Cp for qemu-devel@nongnu.org; Tue, 05 May 2015 08:34:26 -0400 Message-ID: <5548B8A5.3040303@redhat.com> Date: Tue, 05 May 2015 06:33:41 -0600 From: Eric Blake MIME-Version: 1.0 References: <1428775783-18082-1-git-send-email-eblake@redhat.com> <1428775783-18082-4-git-send-email-eblake@redhat.com> <87y4lb6uls.fsf@blackfin.pond.sub.org> In-Reply-To: <87y4lb6uls.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bmbsqfKmfXSe0tl5ukWdwgXXkuUiJwol5" Subject: Re: [Qemu-devel] [PATCH v2 3/4] qapi: Correctly handle downstream extensions in more locations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, akong@redhat.com, berto@igalia.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bmbsqfKmfXSe0tl5ukWdwgXXkuUiJwol5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/29/2015 05:29 AM, Markus Armbruster wrote: > Eric Blake writes: >=20 >> Now that c_var() handles '.' in downstream extension names, fix >> the generator to support such names as additional types, enums, >> members within an enum, branches of a union or alternate, and >> in arrays. >> >> -def generate_visit_list(name, members): >> +def generate_visit_list(name, members, builtin=3DFalse): >> + if not builtin: >> + name =3D c_var(name) >=20 > Fun. >=20 > c_var() does two things: >=20 > (a) it protects certain words if protect=3DTrue >=20 > (b) it maps funny characters to '_'. >=20 > When builtin, (a) is unwanted, and (b) does nothing. That's why we nee= d > the conditional. >=20 > A possible alternative could be c_var(name, not builtin). Matter of > taste. >=20 > Hmm, just saw what type_name() does. Why not just >=20 > name =3D type_name(name) >=20 > ? Oops, I think I missed this comment in my v3 posting, amidst all my patch splitting. >=20 > If it was my patch, I'd be tempted to split it up some. Matter of > taste, feel free to keep it a single patch. v3 splits it up. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --bmbsqfKmfXSe0tl5ukWdwgXXkuUiJwol5 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/ iQEcBAEBCAAGBQJVSLilAAoJEKeha0olJ0Nq8GUIAIc1l0vrbxbfEndMCdyk/Jg0 hvwo3R7oDC/I5wqK/81oVnm/eBjI9DVwECuFevprBdESt/p5Uys3vcZPMKv+ADzZ RGsl67/pW6LH4C4942n0XBFW+KIyYErnXKpuRrWhNSyma8bCYk1e2fF5ZlbgMu9+ /dTJh02tdNx+3LW9+6e5HK99MJkgTxUDEMyeqgGcfjZUnp9IaVkEEktBwhPyYWfX Fz2biisndX/HIYleokqwNA+TlSi1QS8nWlGfUgU0xNFQP2B/9WQoEKaRUuIUQ5qc wF0jYgtLbxKWSEewwU1pSCUmJz+VVohmPLkqS8GQe3GFJYzTOrAYBny/aN2+by4= =wrYO -----END PGP SIGNATURE----- --bmbsqfKmfXSe0tl5ukWdwgXXkuUiJwol5--