qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V4 8/9] qapi: convert BlockdevOptions to use enu


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V4 8/9] qapi: convert BlockdevOptions to use enum discriminator
Date: Fri, 13 Dec 2013 16:50:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 12/10/2013 10:48 PM, Wenchao Xia wrote:
> After this patch, hidden enum type BlockdevOptionsKind will not
> be generated, and other API can use enum BlockdevDriver.
> 
> Signed-off-by: Wenchao Xia <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
>  qapi-schema.json |   14 +++++++++++++-
>  1 files changed, 13 insertions(+), 1 deletions(-)

You know, it might even be better if we just flat out require that ALL
discriminated unions use an enum type, and discontinue support for
open-coded string (with hidden enum generation).  The extra type safety
and potential for introspection that it buys us is worth the change.  I
don't know how much of your series that would affect, but it's food for
thought.

-- 
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]