From 1962bd39d567e8b44646e558b07b2742a5a61339 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 13 Dec 2018 16:37:04 +0400 Subject: qapi: change enum visitor and gen_enum* to take QAPISchemaMember This will allow to add and access more properties associated with enum values/members, like the associated 'if' condition. We may want to have a specialized type QAPISchemaEnumMember, for now this will do. Modify gen_enum() and gen_enum_lookup() for the same reason. Suggested-by: Markus Armbruster Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id: <20181213123724.4866-3-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster --- tests/qapi-schema/test-qapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/qapi-schema') diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index cea21c773a..27f776693e 100644 --- a/tests/qapi-schema/test-qapi.py +++ b/tests/qapi-schema/test-qapi.py @@ -23,8 +23,8 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor): def visit_include(self, name, info): print('include %s' % name) - def visit_enum_type(self, name, info, ifcond, values, prefix): - print('enum %s %s' % (name, values)) + def visit_enum_type(self, name, info, ifcond, members, prefix): + print('enum %s %s' % (name, [m.name for m in members])) if prefix: print(' prefix %s' % prefix) self._print_if(ifcond) -- cgit v1.2.3-55-g7522