diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-12-13 16:37:04 +0400 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-12-13 19:20:11 +0100 |
commit | 1962bd39d567e8b44646e558b07b2742a5a61339 (patch) | |
tree | 0e9ed5c1470126b4547db126d9286b3d9dbb92af /scripts/qapi/visit.py | |
parent | 9c2f56e9f9d5a1f9ddac77dda35f997738e85d11 (diff) |
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 <armbru@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20181213123724.4866-3-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/visit.py')
-rw-r--r-- | scripts/qapi/visit.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi/visit.py b/scripts/qapi/visit.py index 460cf12989..24f85a2e85 100644 --- a/scripts/qapi/visit.py +++ b/scripts/qapi/visit.py @@ -310,7 +310,7 @@ class QAPISchemaGenVisitVisitor(QAPISchemaModularCVisitor): ''', types=types)) - def visit_enum_type(self, name, info, ifcond, values, prefix): + def visit_enum_type(self, name, info, ifcond, members, prefix): with ifcontext(ifcond, self._genh, self._genc): self._genh.add(gen_visit_decl(name, scalar=True)) self._genc.add(gen_visit_enum(name)) |