diff options
author | Marc-André Lureau | 2018-07-03 17:56:38 +0200 |
---|---|---|
committer | Markus Armbruster | 2018-07-03 18:38:53 +0200 |
commit | fbf09a2fa4d9460033023e56cc1b195be053b353 (patch) | |
tree | edb43d1d3a2e875a6365281c80bbefef4f63e9fe /scripts/qapi/types.py | |
parent | qapi: leave the ifcond attribute undefined until check() (diff) | |
download | qemu-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.py | 8 |
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)) |