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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches
Date: Fri, 18 May 2018 08:45:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

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?

[...]



reply via email to

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