mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
qapi: add 'if' to alternate members
Add 'if' key to alternate members: { 'alternate': 'TestIfAlternate', 'data': { 'alt': { 'type': 'TestStruct', 'if': 'COND' } } } Generated code is not changed by this patch but with "qapi: add #if conditions to generated code". Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181213123724.4866-17-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
a2724280fb
commit
3e270dcacc
4 changed files with 10 additions and 7 deletions
|
@ -300,6 +300,7 @@ alternate TestIfAlternate
|
|||
tag type
|
||||
case foo: int
|
||||
case bar: TestStruct
|
||||
if ['defined(TEST_IF_ALT_BAR)']
|
||||
if ['defined(TEST_IF_ALT) && defined(TEST_IF_STRUCT)']
|
||||
object q_obj_TestIfAlternateCmd-arg
|
||||
member alt_cmd_arg: TestIfAlternate optional=False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue