qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 36/39] qapi: Drop support for inline nested t


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v7 36/39] qapi: Drop support for inline nested types
Date: Fri, 01 May 2015 14:20:48 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

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 <address@hidden>
> Reviewed-by: Markus Armbruster <address@hidden>
> ---
>  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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]