Re: [Qemu-devel] [PATCH 08/26] qapi: Generate a nicer struct for flat unions

2015-08-04 Thread Eric Blake
On 08/04/2015 03:17 AM, Markus Armbruster wrote: > The struct generated for a flat union is weird: the members of its > base are at the end, except for the union tag, which is at the > beginning. > > Change to put all base members at the beginning, unadulterated. Not > only is this easier to und

[Qemu-devel] [PATCH 08/26] qapi: Generate a nicer struct for flat unions

2015-08-04 Thread Markus Armbruster
The struct generated for a flat union is weird: the members of its base are at the end, except for the union tag, which is at the beginning. Example: qapi-schema-test.json has { 'struct': 'UserDefUnionBase', 'data': { 'string': 'str', 'enum1': 'EnumOne' } } { 'union': 'UserDefFlatU