On 07/29/2015 02:00 AM, Markus Armbruster wrote:
We don't have any code that demonstrates this, but probably should. I
ran into it while working up my POC of what it would take to unbox
inherited structs
(http://thread.gmane.org/gmane.comp.emulators.qemu/353204)
>>>
>>> Is thi
Eric Blake writes:
> On 07/28/2015 12:44 AM, Markus Armbruster wrote:
>
>>>
+def gen_visit_union(name, base, variants):
+ret = ''
if base:
-assert discriminator
-base_fields = find_struct(base)['data'].copy()
-del base_fields[d
Eric Blake writes:
> On 07/28/2015 12:41 AM, Markus Armbruster wrote:
>>> Like reserving ourselves a namespace based on single _ for internal use.
>>> We practically already have that - all user names either start with a
>>> letter or double underscore, so we could use single (and triple)
>>> un
On 07/28/2015 12:44 AM, Markus Armbruster wrote:
>>
>>> +def gen_visit_union(name, base, variants):
>>> +ret = ''
>>>
>>> if base:
>>> -assert discriminator
>>> -base_fields = find_struct(base)['data'].copy()
>>> -del base_fields[discriminator]
>>> -ret +
On 07/28/2015 12:41 AM, Markus Armbruster wrote:
>> Like reserving ourselves a namespace based on single _ for internal use.
>> We practically already have that - all user names either start with a
>> letter or double underscore, so we could use single (and triple)
>> underscore for internally-gen
Eric Blake writes:
> On 07/01/2015 02:22 PM, Markus Armbruster wrote:
>> Fixes flat unions to visit the base's base members (the previous
>> commit merely added them to the struct). Same test case.
>>
>> Patch's effect on visit_type_UserDefFlatUnion():
>>
>> static void visit_type_UserDef
Eric Blake writes:
> On 07/27/2015 11:53 AM, Markus Armbruster wrote:
>
>>> Oh, and that means our generator has a collision bug that none of my
>>> added tests have exposed yet: you cannot have a base class and
>>> simultaneously add a member named 'base':
>>>
>>> { 'struct': 'Base', 'data': { '
On 07/01/2015 02:22 PM, Markus Armbruster wrote:
> Fixes flat unions to visit the base's base members (the previous
> commit merely added them to the struct). Same test case.
>
> Patch's effect on visit_type_UserDefFlatUnion():
>
> static void visit_type_UserDefFlatUnion_fields(Visitor *m,
On 07/27/2015 11:53 AM, Markus Armbruster wrote:
>> Oh, and that means our generator has a collision bug that none of my
>> added tests have exposed yet: you cannot have a base class and
>> simultaneously add a member named 'base':
>>
>> { 'struct': 'Base', 'data': { 'i': 'int' } }
>> { 'struct':
Eric Blake writes:
> On 07/01/2015 02:22 PM, Markus Armbruster wrote:
>> Fixes flat unions to visit the base's base members (the previous
>> commit merely added them to the struct). Same test case.
>>
>> Patch's effect on visit_type_UserDefFlatUnion():
>>
>> static void visit_type_UserDef
On 07/01/2015 02:22 PM, Markus Armbruster wrote:
> Fixes flat unions to visit the base's base members (the previous
> commit merely added them to the struct). Same test case.
>
> Patch's effect on visit_type_UserDefFlatUnion():
>
> static void visit_type_UserDefFlatUnion_fields(Visitor *m,
Fixes flat unions to visit the base's base members (the previous
commit merely added them to the struct). Same test case.
Patch's effect on visit_type_UserDefFlatUnion():
static void visit_type_UserDefFlatUnion_fields(Visitor *m,
UserDefFlatUnion **obj, Error **errp)
{
Error
12 matches
Mail list logo