Re: [Qemu-devel] [PATCH v10 10/13] qapi: Don't box struct branch of alternate

2016-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/17/2016 07:40 AM, Markus Armbruster wrote: > > There's no reason to do two malloc's for an alternate type visiting > a QAPI struct; let's just inline the struct directly as the C union > branch of the struct. > > >>> Also, here we pass 'obj'; visit_type_

Re: [Qemu-devel] [PATCH v10 10/13] qapi: Don't box struct branch of alternate

2016-02-17 Thread Eric Blake
On 02/17/2016 07:40 AM, Markus Armbruster wrote: There's no reason to do two malloc's for an alternate type visiting a QAPI struct; let's just inline the struct directly as the C union branch of the struct. >> Also, here we pass 'obj'; visit_type_FOO() had to pass '*obj' (agai

Re: [Qemu-devel] [PATCH v10 10/13] qapi: Don't box struct branch of alternate

2016-02-17 Thread Markus Armbruster
Eric Blake writes: > On 02/16/2016 12:07 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> There's no reason to do two malloc's for an alternate type visiting >>> a QAPI struct; let's just inline the struct directly as the C union >>> branch of the struct. >>> >>> Surprisingly, no clien

Re: [Qemu-devel] [PATCH v10 10/13] qapi: Don't box struct branch of alternate

2016-02-16 Thread Eric Blake
On 02/16/2016 12:07 PM, Markus Armbruster wrote: > Eric Blake writes: > >> There's no reason to do two malloc's for an alternate type visiting >> a QAPI struct; let's just inline the struct directly as the C union >> branch of the struct. >> >> Surprisingly, no clients were actually using the str

Re: [Qemu-devel] [PATCH v10 10/13] qapi: Don't box struct branch of alternate

2016-02-16 Thread Markus Armbruster
Eric Blake writes: > There's no reason to do two malloc's for an alternate type visiting > a QAPI struct; let's just inline the struct directly as the C union > branch of the struct. > > Surprisingly, no clients were actually using the struct member prior > to this patch; some testsuite coverage

[Qemu-devel] [PATCH v10 10/13] qapi: Don't box struct branch of alternate

2016-02-15 Thread Eric Blake
There's no reason to do two malloc's for an alternate type visiting a QAPI struct; let's just inline the struct directly as the C union branch of the struct. Surprisingly, no clients were actually using the struct member prior to this patch; some testsuite coverage is added to avoid future regress