qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 02/28] qapi: Fix generation of 'size' builtin


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v5 02/28] qapi: Fix generation of 'size' builtin type
Date: Thu, 26 Mar 2015 10:52:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> We were missing the 'size' builtin type (which means that QAPI using
> [ 'size' ] would fail to compile).

I suspect it chokes on 'size' in anonymous unions, too.

>                                     Futhermore, there was some
> redundancy between builtin_types[] and builtin_type_qtypes{}.
>
> Signed-off-by: Eric Blake <address@hidden>

Split off "[PATCH v4 10/19] qapi: Better error messages for duplicated
expressions".  Good.

> ---
>  scripts/qapi-types.py                   | 10 +++++-----
>  scripts/qapi-visit.py                   |  6 +++---
>  scripts/qapi.py                         |  9 ++-------
>  tests/qapi-schema/qapi-schema-test.json |  3 ++-
>  tests/qapi-schema/qapi-schema-test.out  |  2 +-
>  5 files changed, 13 insertions(+), 17 deletions(-)
>
> diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
> index db87218..e400b03 100644
> --- a/scripts/qapi-types.py
> +++ b/scripts/qapi-types.py
> @@ -182,8 +182,8 @@ const int %(name)s_qtypes[QTYPE_MAX] = {
>
>      for key in members:
>          qapi_type = members[key]
> -        if builtin_type_qtypes.has_key(qapi_type):
> -            qtype = builtin_type_qtypes[qapi_type]
> +        if builtin_types.has_key(qapi_type):
> +            qtype = builtin_types[qapi_type]
>          elif find_struct(qapi_type):
>              qtype = "QTYPE_QDICT"
>          elif find_union(qapi_type):

Took me a bit of digging to make the connection to "there was some
redundancy between builtin_types[] and builtin_type_qtypes{}", and to
the patch to qapi.py.

You could split this patch up: one part for folding _qtypes into _types,
and another part for fixing 'size'.  Not worth a respin by itself, so:

Reviewed-by: Markus Armbruster <address@hidden>

[...]



reply via email to

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