[Qemu-devel] [PATCH V9 07/10] qapi script: support enum type as discriminator in union

2014-03-04 Thread Wenchao Xia
By default, any union will automatically generate a enum type as "[UnionName]Kind" in C code, and it is duplicated when the discriminator is specified as a pre-defined enum type in schema. After this patch, the pre-defined enum type will be really used as the switch case condition in generated C co

Re: [Qemu-devel] [PATCH V9 07/10] qapi script: support enum type as discriminator in union

2014-03-06 Thread Markus Armbruster
Wenchao Xia writes: > By default, any union will automatically generate a enum type as > "[UnionName]Kind" in C code, and it is duplicated when the discriminator > is specified as a pre-defined enum type in schema. After this patch, > the pre-defined enum type will be really used as the switch ca

Re: [Qemu-devel] [PATCH V9 07/10] qapi script: support enum type as discriminator in union

2014-03-06 Thread Wenchao Xia
于 2014/3/6 16:25, Markus Armbruster 写道: > Wenchao Xia writes: > >> By default, any union will automatically generate a enum type as >> "[UnionName]Kind" in C code, and it is duplicated when the discriminator >> is specified as a pre-defined enum type in schema. After this patch, >> the pre-defined

Re: [Qemu-devel] [PATCH V9 07/10] qapi script: support enum type as discriminator in union

2014-03-06 Thread Luiz Capitulino
On Thu, 06 Mar 2014 19:54:33 +0800 Wenchao Xia wrote: > 于 2014/3/6 16:25, Markus Armbruster 写道: > > Wenchao Xia writes: > > > >> By default, any union will automatically generate a enum type as > >> "[UnionName]Kind" in C code, and it is duplicated when the discriminator > >> is specified as a p

Re: [Qemu-devel] [PATCH V9 07/10] qapi script: support enum type as discriminator in union

2014-03-06 Thread Wenchao Xia
于 2014/3/6 21:03, Luiz Capitulino 写道: On Thu, 06 Mar 2014 19:54:33 +0800 Wenchao Xia wrote: 于 2014/3/6 16:25, Markus Armbruster 写道: Wenchao Xia writes: By default, any union will automatically generate a enum type as "[UnionName]Kind" in C code, and it is duplicated when the discriminator