qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches


From: Anton Nefedov
Subject: Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches
Date: Fri, 18 May 2018 11:16:12 +0300
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0



On 18/5/2018 9:45 AM, Markus Armbruster wrote:
Eric Blake <address@hidden> writes:

On 05/17/2018 03:05 AM, Markus Armbruster wrote:
QAPI language design alternatives:

1. Having unions cover all discriminator values explicitly is useful.

2. Having unions repeat all the discriminator values explicitly is not
useful.  All we need is replacing the code enforcing that by code
defaulting missing ones to the empty type.


I think I'd vote for 2 (never enforce all-branches coverage) as well.

Eric, what do you think?

I'm sold. Let's go ahead and make the change that for any flat union,
a branch not listed defaults to the empty type (no added fields)
rather than being an error, then simplify a couple of the existing
flat unions that benefit from that.

Anton, would you like to give this a try?

[...]


Sure, I can try this next week.



reply via email to

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