mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
qapi: New special feature flag "deprecated"
Unlike regular feature flags, the new special feature flag "deprecated" is recognized by the QAPI generator. For now, it's only permitted with commands, events, and struct members. It will be put to use shortly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200317115459.31821-26-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Doc typo fixed]
This commit is contained in:
parent
4a8837389e
commit
f965e8fea6
8 changed files with 24 additions and 6 deletions
|
@ -193,6 +193,12 @@ class QAPISchemaType(QAPISchemaEntity):
|
|||
return None
|
||||
return self.name
|
||||
|
||||
def check(self, schema):
|
||||
QAPISchemaEntity.check(self, schema)
|
||||
if 'deprecated' in [f.name for f in self.features]:
|
||||
raise QAPISemError(
|
||||
self.info, "feature 'deprecated' is not supported for types")
|
||||
|
||||
def describe(self):
|
||||
assert self.meta
|
||||
return "%s type '%s'" % (self.meta, self.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue