qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema fo


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema for QMP schema introspection
Date: Thu, 23 Apr 2015 13:29:47 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

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 <address@hidden> wrote:
>>>
>>>>> +{ '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.
> 
> 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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]