qapi: add 'if' to union members
commita2724280fbed914e517403890b4b1568261f0cf9
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 13 Dec 2018 12:37:17 +0000 (13 16:37 +0400)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 13 Dec 2018 18:20:11 +0000 (13 19:20 +0100)
tree8247f997c6f67d509933111d95e1445665075eb7
parentccadd6bcba3bef6c1954f533b10224fb3db7148e
qapi: add 'if' to union members

Add 'if' key to union members:

{ 'union': 'TestIfUnion', 'data':
    'mem': { 'type': 'str', 'if': 'COND'} }

The generated code remains unconditional for now. Later patches
generate the conditionals.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20181213123724.4866-16-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
docs/devel/qapi-code-gen.txt
scripts/qapi/common.py
tests/qapi-schema/qapi-schema-test.json
tests/qapi-schema/qapi-schema-test.out
tests/qapi-schema/test-qapi.py