On 04/29/2015 07:06 AM, Eric Blake wrote: > A future patch will be using a 'name':{dictionary} entry in the > QAPI schema to specify a default value for an optional argument > (see previous commit messages for more details why); but existing > use of inline nested structs conflicts with that goal. Now that > all commands have been changed to avoid inline nested structs, > nuke support for them, and turn it into a hard error. Update the > testsuite to reflect tighter parsing rules. > > Signed-off-by: Eric Blake <ebl...@redhat.com> > Reviewed-by: Markus Armbruster <arm...@redhat.com> > --- > scripts/qapi-commands.py | 8 +++--- > scripts/qapi-event.py | 4 +-- > scripts/qapi-types.py | 9 ++----- > scripts/qapi-visit.py | 37 > ++++------------------------ > scripts/qapi.py | 20 ++++++---------
> +++ b/scripts/qapi-visit.py > @@ -51,27 +51,6 @@ def generate_visit_struct_fields(name, field_prefix, > fn_prefix, members, base = > else: > full_name = "%s_%s" % (name, fn_prefix) > > - for argname, argentry, optional, structured in parse_args(members): > - if structured: > - if not fn_prefix: > - nested_fn_prefix = argname > - else: > - nested_fn_prefix = "%s_%s" % (fn_prefix, argname) > - > - nested_field_prefix = "%s%s." % (field_prefix, argname) > - ret += generate_visit_struct_fields(name, nested_field_prefix, > - nested_fn_prefix, argentry) This is the only place that calls generate_visit_struct_fields with a non-empty string for prefix arguments; I've got a cleanup patch that we can either squash into this patch or leave as standalone. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature