From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuT9V-00067k-Pu for qemu-devel@nongnu.org; Thu, 05 Nov 2015 17:37:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuT9R-0003qJ-PK for qemu-devel@nongnu.org; Thu, 05 Nov 2015 17:37:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuT9R-0003pn-KN for qemu-devel@nongnu.org; Thu, 05 Nov 2015 17:37:01 -0500 References: <1446618049-13596-22-git-send-email-eblake@redhat.com> <1446737402-15597-1-git-send-email-armbru@redhat.com> <1446737402-15597-4-git-send-email-armbru@redhat.com> <20151105160114.GG15525@redhat.com> <563B86CD.4090203@redhat.com> From: Eric Blake Message-ID: <563BDA06.6070305@redhat.com> Date: Thu, 5 Nov 2015 15:36:54 -0700 MIME-Version: 1.0 In-Reply-To: <563B86CD.4090203@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9NPhtiTXN6hwVt1Df08GpkdjUc8TDmUbx" Subject: Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , Markus Armbruster Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9NPhtiTXN6hwVt1Df08GpkdjUc8TDmUbx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/05/2015 09:41 AM, Eric Blake wrote: > In order to (later) support case-insensitive QMP, we need to decide up > front that we will not allow any qapi member names to collide > case-insensitively (outlaw 'a' and 'A' in the same struct; although the= > C code is still case-preserving); and now that this series is adding a > single check_clash() function, it's very easy to do. In fact, I'll add= > that to my series for 2.5 (it's always easier to reserve something now,= > especially if no one was using it, and then relax later; than it is to > try and restrict things later but run into counter-cases). Eww - it's not quite as trivial as I thought: we have QMP struct 'CpuInfo' as part of command 'query-cpus' that has both a 'pc' and 'PC' member. However, it's not unsalvageable: the type is made up of a bunch of architecture-specific optional fields along with documentation that "field x is only present for architecture y". So it would be possible to turn this type into a flat union, adding a new enum for architecture, and separating the object so that 'pc' is part of the 'i386', 'x86_64', and 'Sparc' branches, while 'PC' is part of the 'Mips' branch. At any rate, I'll post an RFC. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9NPhtiTXN6hwVt1Df08GpkdjUc8TDmUbx 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/ iQEcBAEBCAAGBQJWO9oGAAoJEKeha0olJ0Nq/ScIAKkcHug4EqcX2CB53GJ+W7lw eqAon2AR3oVDWj9qC6bSfzsp79jXsAsfPgTeKaMy+fDQGYamTpg2GM5sv76nxqpk rgQxr0CsOI5R5N4dAn04LdI9+AhQQ3zNtkNziiW66ZdEL7jTPs0rNV02ZFTaN5a9 P+dZFhULFYNMKHwtFZS975yuh5fBhs79jgb3e+pPgYhlSMMsoV8K93SNS8qMJB0X h5Cj5Sakm7eIEjM7W/940lNgMJJcKDClGT0NJ2gIwRZyhOBxN5JzM3/ekPnRI7lc 7VbpBqJbTyUSE3pVAFALsHzkvgTVUB6hHAxX7piHyTR7JwXfvAXPxkOF6iLHfRM= =hrLz -----END PGP SIGNATURE----- --9NPhtiTXN6hwVt1Df08GpkdjUc8TDmUbx--