From fbf09a2fa4d9460033023e56cc1b195be053b353 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Tue, 3 Jul 2018 17:56:38 +0200 Subject: qapi: add 'ifcond' to visitor methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modify the test visitor to check correct passing of values. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id: <20180703155648.11933-5-marcandre.lureau@redhat.com> [Accidental change to roms/seabios dropped] Signed-off-by: Markus Armbruster --- scripts/qapi/types.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/qapi/types.py') 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)) -- cgit 1.4.1