summaryrefslogtreecommitdiffstats
path: root/scripts/qapi/events.py
diff options
context:
space:
mode:
authorPeter Maydell2021-08-26 14:42:34 +0200
committerPeter Maydell2021-08-26 14:42:34 +0200
commitc83fcfaf8a54d0d034bd0edf7bbb3b0d16669be9 (patch)
treec25238aa2e85e53975e34765616fb0a3976bf2f0 /scripts/qapi/events.py
parentMerge remote-tracking branch 'remotes/ehabkost-gl/tags/x86-next-pull-request'... (diff)
parentqapi: make 'if' condition strings simple identifiers (diff)
downloadqemu-c83fcfaf8a54d0d034bd0edf7bbb3b0d16669be9.tar.gz
qemu-c83fcfaf8a54d0d034bd0edf7bbb3b0d16669be9.tar.xz
qemu-c83fcfaf8a54d0d034bd0edf7bbb3b0d16669be9.zip
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-08-26' into staging
QAPI patches patches for 2021-08-26 # gpg: Signature made Thu 26 Aug 2021 13:18:34 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2021-08-26: qapi: make 'if' condition strings simple identifiers qapi: add 'not' condition operation qapi: Use 'if': { 'any': ... } where appropriate qapi: add 'any' condition qapi: replace if condition list with dict {'all': [...]} qapidoc: introduce QAPISchemaIfCond.docgen() qapi: introduce QAPISchemaIfCond.cgen() qapi: add QAPISchemaIfCond.is_present() qapi: wrap Sequence[str] in an object docs: update the documentation upfront about schema configuration qapi: Fix crash on redefinition with a different condition Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/qapi/events.py')
-rw-r--r--scripts/qapi/events.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/qapi/events.py b/scripts/qapi/events.py
index fee8c671e7..82475e84ec 100644
--- a/scripts/qapi/events.py
+++ b/scripts/qapi/events.py
@@ -12,7 +12,7 @@ This work is licensed under the terms of the GNU GPL, version 2.
See the COPYING file in the top-level directory.
"""
-from typing import List, Optional, Sequence
+from typing import List, Optional
from .common import c_enum_const, c_name, mcgen
from .gen import QAPISchemaModularCVisitor, build_params, ifcontext
@@ -20,6 +20,7 @@ from .schema import (
QAPISchema,
QAPISchemaEnumMember,
QAPISchemaFeature,
+ QAPISchemaIfCond,
QAPISchemaObjectType,
)
from .source import QAPISourceInfo
@@ -227,7 +228,7 @@ void %(event_emit)s(%(event_enum)s event, QDict *qdict);
def visit_event(self,
name: str,
info: Optional[QAPISourceInfo],
- ifcond: Sequence[str],
+ ifcond: QAPISchemaIfCond,
features: List[QAPISchemaFeature],
arg_type: Optional[QAPISchemaObjectType],
boxed: bool) -> None: