Re: [Qemu-devel] [PATCH v9 07/17] qapi: Start converting to new qapi union layout

2015-10-22 Thread Eric Blake
On 10/22/2015 07:54 AM, Markus Armbruster wrote: > > This is clever and ugly in equal measure. I respect that. Fortunately, > it's also temporary. > >> Flat unions do not need the anonymous union for the tag member, >> as we already fixed that to use the member name instead of 'kind' >> back i

Re: [Qemu-devel] [PATCH v9 07/17] qapi: Start converting to new qapi union layout

2015-10-22 Thread Markus Armbruster
Eric Blake writes: > We have two issues with our qapi union layout: > 1) Even though the QMP wire format spells the tag 'type', the > C code spells it 'kind', requiring some hacks in the generator. > 2) The C struct uses an anonymous union, which places all tag > values in the same namespace as a

Re: [Qemu-devel] [PATCH v9 07/17] qapi: Start converting to new qapi union layout

2015-10-22 Thread Markus Armbruster
Eric Blake writes: > On 10/22/2015 07:54 AM, Markus Armbruster wrote: > >> >> This is clever and ugly in equal measure. I respect that. Fortunately, >> it's also temporary. >> >>> Flat unions do not need the anonymous union for the tag member, >>> as we already fixed that to use the member na

[Qemu-devel] [PATCH v9 07/17] qapi: Start converting to new qapi union layout

2015-10-15 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This le