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 <arm...@redhat.com> > --- > 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 <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature