[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: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema for QMP schema introspection |
Date: |
Thu, 23 Apr 2015 14:55:06 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
Kevin
Re: [Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema for QMP schema introspection, Kevin Wolf, 2015/04/23
[Qemu-devel] [PATCH RFC 16/19] qobject: Clean up around qtype_code, Markus Armbruster, 2015/04/02
[Qemu-devel] [PATCH RFC 13/19] qapi: Factor open_output(), close_output() out of generators, Markus Armbruster, 2015/04/02
[Qemu-devel] [PATCH RFC 10/19] qapi: Factor parse_command_line() out of the generators, Markus Armbruster, 2015/04/02