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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v7 36/39] qapi: Drop support for inline nested types
Date: Mon, 04 May 2015 09:28:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> 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.

Squash vs. separate patch: your choice.



reply via email to

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