]> git.proxmox.com Git - mirror_qemu.git/commit
qapi: Permit omitting all flat union branches
authorMarkus Armbruster <armbru@redhat.com>
Fri, 13 Sep 2019 20:13:43 +0000 (22:13 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 24 Sep 2019 12:07:22 +0000 (14:07 +0200)
commit0ced9531f17c1c28fa4f29b352729c7f40c2ae30
tree01b884f181062407e78f158d48c4d085e438852b
parentf03255362ae3bfd6f105c0fc855c713944f99717
qapi: Permit omitting all flat union branches

Absent flat union branches default to the empty struct (since commit
800877bb16 "qapi: allow empty branches in flat unions").  But an
attempt to omit all of them is rejected with "Union 'FOO' has no
branches".  Harmless oddity, but it's easy to avoid, so do that.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190913201349.24332-11-armbru@redhat.com>
[Commit message typo fixed]
docs/devel/qapi-code-gen.txt
scripts/qapi/common.py
tests/qapi-schema/flat-union-empty.err
tests/qapi-schema/flat-union-empty.json
tests/qapi-schema/qapi-schema-test.json
tests/qapi-schema/qapi-schema-test.out
tests/qapi-schema/union-empty.err
tests/qapi-schema/union-empty.json