Eric Blake writes:
> On 07/29/2015 01:33 AM, Markus Armbruster wrote:
>> Eric Blake writes:
>>
>>> On 07/01/2015 02:21 PM, 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 renamed to
>>>
Markus Armbruster writes:
> Eric Blake writes:
>
>> On 07/01/2015 02:21 PM, 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 renamed to
>>> 'kind' and put at the beginning.
>>
>> The renami
On 07/30/2015 09:44 AM, Markus Armbruster wrote:
which means that if we name any of the branches 'data' (that is, if
'data' is a member of the enum discriminator), things fail to compile.
We could probably fix that by naming our dummy branch '_data'.
>>>
>>> I wonder whether member
Eric Blake writes:
> On 07/30/2015 01:11 AM, Markus Armbruster wrote:
>
>>> Another name collision bug: our code generates flat unions as:
>>>
>>> struct BlockdevOptions {
>>> BlockdevDriver driver;
>>> ...
>>> /* End fields inherited from BlockdevOptionsBase. */
>>> /* union tag is B
On 07/30/2015 01:11 AM, Markus Armbruster wrote:
>> Another name collision bug: our code generates flat unions as:
>>
>> struct BlockdevOptions {
>> BlockdevDriver driver;
>> ...
>> /* End fields inherited from BlockdevOptionsBase. */
>> /* union tag is BlockdevDriver driver */
>>
Eric Blake writes:
> On 07/29/2015 01:33 AM, Markus Armbruster wrote:
>> Eric Blake writes:
>>
>>> On 07/01/2015 02:21 PM, 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 renamed to
>>>
On 07/29/2015 01:33 AM, Markus Armbruster wrote:
> Eric Blake writes:
>
>> On 07/01/2015 02:21 PM, 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 renamed to
>>> 'kind' and put at the begin
Eric Blake writes:
> On 07/01/2015 02:21 PM, 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 renamed to
>> 'kind' and put at the beginning.
>
> The renaming to 'kind' was a bug waiting to hap
On 07/01/2015 02:21 PM, 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 renamed to
> 'kind' and put at the beginning.
The renaming to 'kind' was a bug waiting to happen. Consider this
example,
Eric Blake writes:
> On 07/24/2015 06:01 AM, Markus Armbruster wrote:
>
>>> It might be worth tweaking the generator to output a C comment either
>>> here (at the start of the larger struct)...
>>>
char *string;
EnumOne enum1;
>>>
>>> ...or here (at the end of the base s
On 07/24/2015 06:01 AM, Markus Armbruster wrote:
>> It might be worth tweaking the generator to output a C comment either
>> here (at the start of the larger struct)...
>>
>>> char *string;
>>> EnumOne enum1;
>>
>> ...or here (at the end of the base struct) mentioning that
>> UserD
Eric Blake writes:
> On 07/01/2015 02:21 PM, 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 renamed to
>> 'kind' and put at the beginning.
>>
>
>> Change to put all base members at the begi
On 07/01/2015 02:21 PM, 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 renamed to
> 'kind' and put at the beginning.
>
> Change to put all base members at the beginning, unadulterated. Not
>
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 renamed to
'kind' and put at the beginning.
Example: qapi-schema-test.json has
{ 'struct': 'UserDefUnionBase',
'data': { 'string': 'str', 'enum1': 'EnumOne' } }
14 matches
Mail list logo