summaryrefslogtreecommitdiffstats
path: root/scripts/qapi/introspect.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/introspect.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/introspect.py')
-rw-r--r--scripts/qapi/introspect.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py
index 6ad198ae5b..245cfdfb65 100644
--- a/scripts/qapi/introspect.py
+++ b/scripts/qapi/introspect.py
@@ -149,26 +149,26 @@ const QLitObject %(c_name)s = %(c_string)s;
def visit_builtin_type(self, name, info, json_type):
self._gen_qlit(name, 'builtin', {'json-type': json_type})
- def visit_enum_type(self, name, info, values, prefix):
+ def visit_enum_type(self, name, info, ifcond, values, prefix):
self._gen_qlit(name, 'enum', {'values': values})
- def visit_array_type(self, name, info, element_type):
+ def visit_array_type(self, name, info, ifcond, element_type):
element = self._use_type(element_type)
self._gen_qlit('[' + element + ']', 'array', {'element-type': element})
- def visit_object_type_flat(self, name, info, members, variants):
+ def visit_object_type_flat(self, name, info, ifcond, members, variants):
obj = {'members': [self._gen_member(m) for m in members]}
if variants:
obj.update(self._gen_variants(variants.tag_member.name,
variants.variants))
self._gen_qlit(name, 'object', obj)
- def visit_alternate_type(self, name, info, variants):
+ def visit_alternate_type(self, name, info, ifcond, variants):
self._gen_qlit(name, 'alternate',
{'members': [{'type': self._use_type(m.type)}
for m in variants.variants]})
- def visit_command(self, name, info, arg_type, ret_type, gen,
+ def visit_command(self, name, info, ifcond, arg_type, ret_type, gen,
success_response, boxed, allow_oob, allow_preconfig):
arg_type = arg_type or self._schema.the_empty_object_type
ret_type = ret_type or self._schema.the_empty_object_type
@@ -178,7 +178,7 @@ const QLitObject %(c_name)s = %(c_string)s;
'allow-oob': allow_oob,
'allow-preconfig': allow_preconfig})
- def visit_event(self, name, info, arg_type, boxed):
+ def visit_event(self, name, info, ifcond, arg_type, boxed):
arg_type = arg_type or self._schema.the_empty_object_type
self._gen_qlit(name, 'event', {'arg-type': self._use_type(arg_type)})