On 08/04/2015 09:57 AM, 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, > UserDefFlatUnion **obj, Error **errp) > { > Error *err = NULL; > > + visit_type_int(m, &(*obj)->integer, "integer", &err); > + if (err) { > + goto out; > + } > visit_type_str(m, &(*obj)->string, "string", &err); > if (err) { > goto out; > > Test cases updated for the bug fix. > > Fixes alternates to generate a visitor for their implicit enumeration > type. None of them are currently used, obviously. Example: > block-core.json's BlockdevRef now generates > visit_type_BlockdevRefKind(). > > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > scripts/qapi-visit.py | 260 > +++++++++++++------------------- > tests/qapi-schema/qapi-schema-test.json | 3 - > tests/test-qmp-input-strict.c | 2 +- > tests/test-qmp-input-visitor.c | 4 +- > 4 files changed, 106 insertions(+), 163 deletions(-) >
> + > +# If you link code generated from multiple schemata, you want only one > +# instance include the code generated for built-in types. Generate it > +# only when do_builtins, enabled by command line option -b. See also > +# QAPISchemaGenVisitVisitor.visit_end(). > do_builtins = False again, s/include/of/ and you can add: Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature