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

2014-03-01 Thread Eric Blake
On 03/01/2014 12:40 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

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

2014-02-28 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