summaryrefslogtreecommitdiffstats
path: root/scripts/qapi/types.py
diff options
context:
space:
mode:
authorMarc-André Lureau2018-07-03 17:56:38 +0200
committerMarkus Armbruster2018-07-03 18:38:53 +0200
commitfbf09a2fa4d9460033023e56cc1b195be053b353 (patch)
treeedb43d1d3a2e875a6365281c80bbefef4f63e9fe /scripts/qapi/types.py
parentqapi: leave the ifcond attribute undefined until check() (diff)
downloadqemu-fbf09a2fa4d9460033023e56cc1b195be053b353.tar.gz
qemu-fbf09a2fa4d9460033023e56cc1b195be053b353.tar.xz
qemu-fbf09a2fa4d9460033023e56cc1b195be053b353.zip
qapi: add 'ifcond' to visitor methods
Modify the test visitor to check correct passing of values. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-5-marcandre.lureau@redhat.com> [Accidental change to roms/seabios dropped] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/types.py')
-rw-r--r--scripts/qapi/types.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/qapi/types.py b/scripts/qapi/types.py
index a599352e59..659075f884 100644
--- a/scripts/qapi/types.py
+++ b/scripts/qapi/types.py
@@ -208,16 +208,16 @@ class QAPISchemaGenTypeVisitor(QAPISchemaModularCVisitor):
self._genh.add(gen_type_cleanup_decl(name))
self._genc.add(gen_type_cleanup(name))
- def visit_enum_type(self, name, info, values, prefix):
+ def visit_enum_type(self, name, info, ifcond, values, prefix):
self._genh.preamble_add(gen_enum(name, values, prefix))
self._genc.add(gen_enum_lookup(name, values, prefix))
- def visit_array_type(self, name, info, element_type):
+ def visit_array_type(self, name, info, ifcond, element_type):
self._genh.preamble_add(gen_fwd_object_or_array(name))
self._genh.add(gen_array(name, element_type))
self._gen_type_cleanup(name)
- def visit_object_type(self, name, info, base, members, variants):
+ def visit_object_type(self, name, info, ifcond, base, members, variants):
# Nothing to do for the special empty builtin
if name == 'q_empty':
return
@@ -231,7 +231,7 @@ class QAPISchemaGenTypeVisitor(QAPISchemaModularCVisitor):
# implicit types won't be directly allocated/freed
self._gen_type_cleanup(name)
- def visit_alternate_type(self, name, info, variants):
+ def visit_alternate_type(self, name, info, ifcond, variants):
self._genh.preamble_add(gen_fwd_object_or_array(name))
self._genh.add(gen_object(name, None,
[variants.tag_member], variants))