mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
qapi: Hide tag_name data member of variants
Clean up the only remaining external use of the tag_name field of QAPISchemaObjectTypeVariants, by explicitly listing the generated 'type' tag for all variants in the testsuite (you can still tell simple unions by the -wrapper types). Then we can mark the tag_name field as private by adding a leading underscore to prevent any further use. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1468468228-27827-5-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
cd50a25645
commit
da9cb19385
3 changed files with 15 additions and 6 deletions
|
@ -47,8 +47,7 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
|
|||
@staticmethod
|
||||
def _print_variants(variants):
|
||||
if variants:
|
||||
if variants.tag_name:
|
||||
print ' tag %s' % variants.tag_name
|
||||
print ' tag %s' % variants.tag_member.name
|
||||
for v in variants.variants:
|
||||
print ' case %s: %s' % (v.name, v.type.name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue