[Qemu-devel] [PATCH 10/10] qapi: Clean up null checking in generated visitors

2014-02-06 Thread Markus Armbruster
Visitors get passed a pointer to the visited object. The generated visitors try to cope with this pointer being null in some places, for instance like this: visit_start_optional(m, obj ? &(*obj)->has_name : NULL, "name", &err); visit_start_optional() passes its second argument to Visitor met

Re: [Qemu-devel] [PATCH 10/10] qapi: Clean up null checking in generated visitors

2014-02-06 Thread Eric Blake
On 02/06/2014 07:30 AM, Markus Armbruster wrote: > Visitors get passed a pointer to the visited object. The generated > visitors try to cope with this pointer being null in some places, for > instance like this: > > visit_start_optional(m, obj ? &(*obj)->has_name : NULL, "name", &err); > > v

Re: [Qemu-devel] [PATCH 10/10] qapi: Clean up null checking in generated visitors

2014-02-06 Thread Markus Armbruster
Eric Blake writes: > On 02/06/2014 07:30 AM, Markus Armbruster wrote: >> Visitors get passed a pointer to the visited object. The generated >> visitors try to cope with this pointer being null in some places, for >> instance like this: >> >> visit_start_optional(m, obj ? &(*obj)->has_name :

Re: [Qemu-devel] [PATCH 10/10] qapi: Clean up null checking in generated visitors

2014-02-07 Thread Paolo Bonzini
Il 06/02/2014 15:30, Markus Armbruster ha scritto: Visitors get passed a pointer to the visited object. The generated visitors try to cope with this pointer being null in some places, for instance like this: visit_start_optional(m, obj ? &(*obj)->has_name : NULL, "name", &err); visit_start

Re: [Qemu-devel] [PATCH 10/10] qapi: Clean up null checking in generated visitors

2014-02-07 Thread Markus Armbruster
Paolo Bonzini writes: > Il 06/02/2014 15:30, Markus Armbruster ha scritto: >> Visitors get passed a pointer to the visited object. The generated >> visitors try to cope with this pointer being null in some places, for >> instance like this: >> >> visit_start_optional(m, obj ? &(*obj)->has_na

Re: [Qemu-devel] [PATCH 10/10] qapi: Clean up null checking in generated visitors

2014-02-07 Thread Paolo Bonzini
Il 07/02/2014 15:23, Markus Armbruster ha scritto: > No objections to patch 1-9. What does it take make you accept PATCH 10? The email you just wrote, basically, :) and removing the NULL pointer checks in the visitor implementations. Paolo

Re: [Qemu-devel] [PATCH 10/10] qapi: Clean up null checking in generated visitors

2014-02-10 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> Il 06/02/2014 15:30, Markus Armbruster ha scritto: >>> Visitors get passed a pointer to the visited object. The generated >>> visitors try to cope with this pointer being null in some places, for >>> instance like this: >>> >>> visit_st

Re: [Qemu-devel] [PATCH 10/10] qapi: Clean up null checking in generated visitors

2014-02-11 Thread Paolo Bonzini
Il 10/02/2014 14:29, Markus Armbruster ha scritto: Markus Armbruster writes: Paolo Bonzini writes: Il 06/02/2014 15:30, Markus Armbruster ha scritto: Visitors get passed a pointer to the visited object. The generated visitors try to cope with this pointer being null in some places, for in

Re: [Qemu-devel] [PATCH 10/10] qapi: Clean up null checking in generated visitors

2014-02-11 Thread Markus Armbruster
Paolo Bonzini writes: > Il 10/02/2014 14:29, Markus Armbruster ha scritto: >> Markus Armbruster writes: >> >>> Paolo Bonzini writes: >>> Il 06/02/2014 15:30, Markus Armbruster ha scritto: > Visitors get passed a pointer to the visited object. The generated > visitors try to cope w