mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi: Add feature flags to remaining definitions
In v4.1.0, we added feature flags just to struct types (commit 6a8c0b5102^..f3ed93d545), to satisfy an immediate need (commitc9d4070991
"file-posix: Add dynamic-auto-read-only QAPI feature"). In v4.2.0, we added them to commands (commit23394b4c39
"qapi: Add feature flags to commands") to satisfy another immediate need (commit d76744e65e "qapi: Allow introspecting fix for savevm's cooperation with blockdev"). Add them to the remaining definitions: enumeration types, union types, alternate types, and events. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200317115459.31821-13-armbru@redhat.com>
This commit is contained in:
parent
e4405b3069
commit
013b4efc9b
17 changed files with 242 additions and 121 deletions
|
@ -316,7 +316,7 @@ class QAPISchemaGenVisitVisitor(QAPISchemaModularCVisitor):
|
|||
''',
|
||||
types=types))
|
||||
|
||||
def visit_enum_type(self, name, info, ifcond, members, prefix):
|
||||
def visit_enum_type(self, name, info, ifcond, features, 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))
|
||||
|
@ -342,7 +342,7 @@ class QAPISchemaGenVisitVisitor(QAPISchemaModularCVisitor):
|
|||
self._genh.add(gen_visit_decl(name))
|
||||
self._genc.add(gen_visit_object(name, base, members, variants))
|
||||
|
||||
def visit_alternate_type(self, name, info, ifcond, variants):
|
||||
def visit_alternate_type(self, name, info, ifcond, features, variants):
|
||||
with ifcontext(ifcond, self._genh, self._genc):
|
||||
self._genh.add(gen_visit_decl(name))
|
||||
self._genc.add(gen_visit_alternate(name, variants))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue