From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlMpZ-0005H6-9M for qemu-devel@nongnu.org; Thu, 23 Apr 2015 15:30:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlMpV-0001MZ-9y for qemu-devel@nongnu.org; Thu, 23 Apr 2015 15:30:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlMpU-0001MN-TQ for qemu-devel@nongnu.org; Thu, 23 Apr 2015 15:30:33 -0400 Message-ID: <5539482B.1080102@redhat.com> Date: Thu, 23 Apr 2015 13:29:47 -0600 From: Eric Blake MIME-Version: 1.0 References: <1427995743-7865-1-git-send-email-armbru@redhat.com> <1427995743-7865-20-git-send-email-armbru@redhat.com> <55285792.70103@redhat.com> <552E6016.1000309@redhat.com> <20150423125506.GI5289@noname.redhat.com> In-Reply-To: <20150423125506.GI5289@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uEMTqWt5840KEMhJ85vMVpReaEN8SgEV8" Subject: Re: [Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema for QMP schema introspection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: mdroth@linux.vnet.ibm.com, akong@redhat.com, Alberto Garcia , Markus Armbruster , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uEMTqWt5840KEMhJ85vMVpReaEN8SgEV8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/23/2015 06:55 AM, Kevin Wolf wrote: > Am 15.04.2015 um 14:56 hat Eric Blake geschrieben: >> On 04/15/2015 03:16 AM, Alberto Garcia wrote: >>> On Sat 11 Apr 2015 01:06:58 AM CEST, Eric Blake w= rote: >>> >>>>> +{ 'type': 'SchemaInfoEnum', >>>>> + 'data': { 'values': ['str'] } } >>>> >>>> At one point, one thread suggested that we might want to allow QAPI = to >>>> support enums with fixed values, as in: >>>> >>>> 'data': [ {'one': 1}, {'three': 3} ] >>> >>> Out of curiosity, what's the use case for that? >> >> If we add that extension, it will allow the creation of C enums with >> specific values, rather than defaulting to consecutive initialization >> from 0. >=20 > But would we want to expose that on the external API? So far we always > said that the mapping to integer constants is an implementation detail > and can safely be changed. Oh, good point. We've already stated that there are some details of qapi (such as 'gen':false) that are not worth exposing through introspection. So even if we ever add specific C values to enums in qapi, I agree that we don't need to expose it during introspection, so we wouldn't need to change SchemaInfoEnum. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --uEMTqWt5840KEMhJ85vMVpReaEN8SgEV8 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/ iQEcBAEBCAAGBQJVOUgrAAoJEKeha0olJ0NqG/QH/i/DvWlZmKo9Qa9vNYjahe5S VPCBKZz65hZt9Gt1qglzVLEEvaBDcAx/I1hwW7Z6ArPED/MGVeR8IEIXzvphJfIi dMEU8qdvbqbsZ9pNEkoUxRJbpnWBAl3INEG6QttO7N7I2yXRVjR2LBZFXI4uSO9A KyTvy1aRn8n26IyF2Ycp9vB1hg0SfaCYgkNwZnvGG9h5J9D2mfahLbQvgBe0xowD LgaourS1T7DZS7iLTbfdXMsn5UxoQNtiNy0RotqhV8qzGo4RdKlAJog8U+avQ+AC 27kK46HOzAP9KU6EeXD3fuUR93k2+/gTf/oloiOqpcgbsQioWmZi4DLhp+nQBhA= =jucH -----END PGP SIGNATURE----- --uEMTqWt5840KEMhJ85vMVpReaEN8SgEV8--