OSDN Git Service

qapi: change enum visitor and gen_enum* to take QAPISchemaMember
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 13 Dec 2018 12:37:04 +0000 (16:37 +0400)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 13 Dec 2018 18:20:11 +0000 (19:20 +0100)
commit1962bd39d567e8b44646e558b07b2742a5a61339
tree0e9ed5c1470126b4547db126d9286b3d9dbb92af
parent9c2f56e9f9d5a1f9ddac77dda35f997738e85d11
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>
scripts/qapi/common.py
scripts/qapi/doc.py
scripts/qapi/events.py
scripts/qapi/introspect.py
scripts/qapi/types.py
scripts/qapi/visit.py
tests/qapi-schema/test-qapi.py