mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
4e99f4b12c
Simple unions predate flat unions. Having both complicates the QAPI schema language and the QAPI generator. We haven't been using simple unions in new code for a long time, because they are less flexible and somewhat awkward on the wire. The previous commits eliminated simple union from the tree. Now drop them from the QAPI schema language entirely, and update mentions of "flat union" to just "union". Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.412106-22-armbru@redhat.com>
14 lines
326 B
JSON
14 lines
326 B
JSON
# we reject unions without discriminator
|
|
{ 'struct': 'TestTypeA',
|
|
'data': { 'string': 'str' } }
|
|
|
|
{ 'struct': 'TestTypeB',
|
|
'data': { 'integer': 'int' } }
|
|
|
|
{ 'struct': 'Base',
|
|
'data': { 'string': 'str' } }
|
|
|
|
{ 'union': 'TestUnion',
|
|
'base': 'Base',
|
|
'data': { 'value1': 'TestTypeA',
|
|
'value2': 'TestTypeB' } }
|