From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnZvp-0003ij-Em for qemu-devel@nongnu.org; Mon, 02 Dec 2013 15:17:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnZvk-000586-RW for qemu-devel@nongnu.org; Mon, 02 Dec 2013 15:17:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnZvk-000581-I3 for qemu-devel@nongnu.org; Mon, 02 Dec 2013 15:17:20 -0500 Message-ID: <529CEACA.9070008@redhat.com> Date: Mon, 02 Dec 2013 13:17:14 -0700 From: Eric Blake MIME-Version: 1.0 References: <1384295108-10913-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1384295108-10913-6-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1384295108-10913-6-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WR3WuVpIrMQH54nWvTVd8fkf3prOMd3BK" Subject: Re: [Qemu-devel] [PATCH V2 5/8] qapi script: use same function to generate enum string List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, kwolf@redhat.com, armbru@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WR3WuVpIrMQH54nWvTVd8fkf3prOMd3BK Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/12/2013 03:25 PM, Wenchao Xia wrote: > One function one rule, so the enum string generating have same > behavior for different caller. If multiple caller exist for one > enum define in schema, it is for sure the generated string is > identical. >=20 > Note before the patch qapi-visit.py used custom function to > generate the string in union visit, although the patch changes it, > the final string generated is not changed. The custom function used > before will met problem when capitalized discriminator value is > introduced. I'm finding this commit message awkward to read and rather wordy. May I suggest the shorter: Prior to this patch, qapi-visit.py used custom code to generate enum names used for handling a qapi union. Fix it to instead reuse common code, with identical generated results, and allowing future updates to generation to only need to touch one place. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --WR3WuVpIrMQH54nWvTVd8fkf3prOMd3BK 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.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSnOrKAAoJEKeha0olJ0NqlQQH/j/nv0Y+XwcAV5mi+PZ25NJb FY1pofaRoJWaiKhKZ+36bH3rlRowToFLAZ192m5ldIqn28kID1U4bGnCTcT+lHap wrySPLg+iUjPmKzeSgkzAMEqycMUKdd8lKDuWS5viVTDNjHQb4fF8rHToSvpVFSf IzW1qhdAcmimqbVykPJCmwmDhrC2+wHIOM1Sl7enkq2Aiqnn/0nftdVWU82UfiRW P0dnPKoVaVyF/zxfyu/ASOQytJHn9MZa3F6B+s02Xuyl4WHMHGiTm+w9CvTOi3Ll Ipv6h5i0iM0wiDWoiJwsXFzf9BU2eTtbYV0PP/deu3qpbGwAVswoPUxV9t5JjRA= =0jj1 -----END PGP SIGNATURE----- --WR3WuVpIrMQH54nWvTVd8fkf3prOMd3BK--