mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
ccadd6bcba
commit
a2724280fb
5 changed files with 17 additions and 9 deletions
|
@ -754,7 +754,7 @@ gets its generated code guarded like this:
|
|||
|
||||
Where a member can be defined with a single string value for its type,
|
||||
it is also possible to supply a dictionary instead with both 'type'
|
||||
and 'if' keys. (TODO: union and alternate)
|
||||
and 'if' keys. (TODO: alternate)
|
||||
|
||||
Example: a conditional 'bar' member
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue