[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enum
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants |
Date: |
Thu, 5 Nov 2015 15:36:54 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v9 04/27] qapi: Simplify error testing in test-qmp-*, (continued)
- [Qemu-devel] [PATCH v9 21/27] qapi: Factor out QAPISchemaObjectType.check_clash(), Eric Blake, 2015/11/04
- [Qemu-devel] [PATCH RFC 0/5] qapi: Use common name mangling for enumeration constants, Markus Armbruster, 2015/11/05
- [Qemu-devel] [PATCH RFC 1/5] qapi: Generate a sed script to help eliminate camel_to_upper(), Markus Armbruster, 2015/11/05
- [Qemu-devel] [PATCH RFC 2/5] Revert "qapi: Generate a sed script to help eliminate camel_to_upper()", Markus Armbruster, 2015/11/05
- [Qemu-devel] [PATCH RFC 4/5] crypto: Drop name mangling override, Markus Armbruster, 2015/11/05
- [Qemu-devel] [PATCH RFC 5/5] Revert "qapi: allow override of default enum prefix naming", Markus Armbruster, 2015/11/05
- [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants, Markus Armbruster, 2015/11/05
- Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants, Daniel P. Berrange, 2015/11/05
- Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants, Eric Blake, 2015/11/05
- Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants,
Eric Blake <=
- Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants, Markus Armbruster, 2015/11/06
- Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants, Markus Armbruster, 2015/11/06
- [Qemu-devel] What to do about QAPI naming convention violations (was: [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants), Markus Armbruster, 2015/11/10
- [Qemu-devel] blkdebug event names [was: What to do about QAPI naming convention violations], Eric Blake, 2015/11/16
- Re: [Qemu-devel] blkdebug event names [was: What to do about QAPI naming convention violations], Markus Armbruster, 2015/11/17
- Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants, Markus Armbruster, 2015/11/09
- Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants, Daniel P. Berrange, 2015/11/09
[Qemu-devel] [PATCH v9 17/27] qapi: Clean up after previous commit, Eric Blake, 2015/11/04