Re: [Qemu-devel] [PATCH v3 1/8] qapi: Add default-variant for flat unions

2019-06-05 Thread Eric Blake
On 2/8/19 12:21 PM, Max Reitz wrote: > On 07.02.19 07:56, Markus Armbruster wrote: >> Max Reitz writes: >> >>> This patch allows specifying a discriminator that is an optional member >>> of the base struct. In such a case, a default value must be provided >>> that is used when no value is given.

Re: [Qemu-devel] [PATCH v3 1/8] qapi: Add default-variant for flat unions

2019-02-08 Thread Max Reitz
On 07.02.19 07:56, Markus Armbruster wrote: > Max Reitz writes: > >> This patch allows specifying a discriminator that is an optional member >> of the base struct. In such a case, a default value must be provided >> that is used when no value is given. >> >> Signed-off-by: Max Reitz >> --- >>

Re: [Qemu-devel] [PATCH v3 1/8] qapi: Add default-variant for flat unions

2019-02-07 Thread Eric Blake
On 2/7/19 8:01 AM, Eric Blake wrote: >> I think there is: we could provide for an *optional* default value. If >> the schema specifies it, that's what 'absent' means. If it doesn't, all >> bets are off, just like they are now. > > And we already have the planned syntax, thanks to our recent wor

Re: [Qemu-devel] [PATCH v3 1/8] qapi: Add default-variant for flat unions

2019-02-07 Thread Eric Blake
On 2/7/19 12:56 AM, Markus Armbruster wrote: > Max Reitz writes: > >> This patch allows specifying a discriminator that is an optional member >> of the base struct. In such a case, a default value must be provided >> that is used when no value is given. >> >> Signed-off-by: Max Reitz >> --- >

Re: [Qemu-devel] [PATCH v3 1/8] qapi: Add default-variant for flat unions

2019-02-06 Thread Markus Armbruster
Max Reitz writes: > This patch allows specifying a discriminator that is an optional member > of the base struct. In such a case, a default value must be provided > that is used when no value is given. > > Signed-off-by: Max Reitz > --- > qapi/introspect.json | 8 + > scripts/qa

Re: [Qemu-devel] [PATCH v3 1/8] qapi: Add default-variant for flat unions

2019-02-06 Thread Eric Blake
On 2/6/19 1:55 PM, Max Reitz wrote: > This patch allows specifying a discriminator that is an optional member > of the base struct. In such a case, a default value must be provided > that is used when no value is given. > > Signed-off-by: Max Reitz > --- > qapi/introspect.json | 8 ++

[Qemu-devel] [PATCH v3 1/8] qapi: Add default-variant for flat unions

2019-02-06 Thread Max Reitz
This patch allows specifying a discriminator that is an optional member of the base struct. In such a case, a default value must be provided that is used when no value is given. Signed-off-by: Max Reitz --- qapi/introspect.json | 8 + scripts/qapi/common.py | 58 +