qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 03/16] qapi: Drop support for boxed alternate


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 03/16] qapi: Drop support for boxed alternate arguments
Date: Tue, 10 Sep 2019 09:54:02 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 9/10/19 1:37 AM, Markus Armbruster wrote:
> Commands and events can define their argument type inline (default) or
> by referring to another type ('boxed': true, since commit c818408e44
> "qapi: Implement boxed types for commands/events", v2.7.0).  The
> unboxed inline definition is an (anonymous) struct type.  The boxed
> type may be a struct, union, or alternate type.
> 
> The latter is problematic: docs/interop/qemu-spec.txt requires the
> value of the 'data' key to be a json-object, but any non-degenerate
> alternate type has at least one branch that isn't.

Good catch.

> 
> Fortunately, we haven't made use of alternates in this context outside
> tests/.  Drop support for them.
> 
> QAPISchemaAlternateType.is_empty() is now unused.  Drop it, too.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  docs/devel/qapi-code-gen.txt            | 12 ++++++------
>  scripts/qapi/common.py                  | 15 ++++-----------
>  tests/qapi-schema/qapi-schema-test.json |  2 +-
>  tests/qapi-schema/qapi-schema-test.out  |  2 +-
>  4 files changed, 12 insertions(+), 19 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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