Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-23 Thread Markus Armbruster
Eric Blake writes: > On 09/23/2015 08:02 AM, Markus Armbruster wrote: > >>> However, I'm not sure it would always help. The conversion of >>> netdev_add to full qapi relies on being able to access the variant >>> through a named struct (such as NetdevTapOptions); unboxing the variant >>> would g

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-23 Thread Eric Blake
On 09/23/2015 08:02 AM, Markus Armbruster wrote: >> However, I'm not sure it would always help. The conversion of >> netdev_add to full qapi relies on being able to access the variant >> through a named struct (such as NetdevTapOptions); unboxing the variant >> would get rid of the convenient acc

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-23 Thread Markus Armbruster
Eric Blake writes: > On 09/23/2015 03:43 AM, Markus Armbruster wrote: > >>> Commit 1e6c1616 was where we quit burning the C member name 'base'. >>> Prior to that time, members of base classes did not clash with variant >>> names because of the C boxing. >> >> For union types. For struct types,

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-23 Thread Eric Blake
On 09/23/2015 03:43 AM, Markus Armbruster wrote: >> Commit 1e6c1616 was where we quit burning the C member name 'base'. >> Prior to that time, members of base classes did not clash with variant >> names because of the C boxing. > > For union types. For struct types, we still box the base. I'd l

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-23 Thread Markus Armbruster
Eric Blake writes: > On 09/22/2015 09:23 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Expose some weaknesses in the generator: we don't always forbid >>> the generation of structs that contain multiple members that map >> >> Slightly misleading. args-name-clash is a clash between

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-22 Thread Eric Blake
On 09/22/2015 09:23 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Expose some weaknesses in the generator: we don't always forbid >> the generation of structs that contain multiple members that map > > Slightly misleading. args-name-clash is a clash between command > arguments. These

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-22 Thread Markus Armbruster
Eric Blake writes: > Expose some weaknesses in the generator: we don't always forbid > the generation of structs that contain multiple members that map Slightly misleading. args-name-clash is a clash between command arguments. These are a struct internally, but we don't currently generate an a

[Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-21 Thread Eric Blake
Expose some weaknesses in the generator: we don't always forbid the generation of structs that contain multiple members that map to the same C name. This has already been marked FIXME in qapi.py, but having more tests will make sure future patches produce desired behavior. Some of these tests wil