aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/events.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-10-18 09:43:43 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-10-22 09:26:12 +0200
commit61bfb2e1a4666817b9d94f0a96109f8ef51b812b (patch)
treee607d3f320a0c46e5998985e436655a6198566f8 /scripts/qapi/events.py
parentf01338cce692ac54109f09bc6c7b5567611e2d24 (diff)
downloadqemu-61bfb2e1a4666817b9d94f0a96109f8ef51b812b.zip
qemu-61bfb2e1a4666817b9d94f0a96109f8ef51b812b.tar.gz
qemu-61bfb2e1a4666817b9d94f0a96109f8ef51b812b.tar.bz2
qapi: Move gen_enum(), gen_enum_lookup() back to qapi/types.py
The next commit will split up qapi/common.py. gen_enum() needs QAPISchemaEnumMember, and that's in the way. Move it to qapi/types.py along with its buddy gen_enum_lookup(). Permit me a short a digression on history: how did gen_enum() end up in qapi/common.py? Commit 21cd70dfc1 "qapi script: add event support" duplicated qapi-types.py's gen_enum() and gen_enum_lookup() in qapi-event.py. Simply importing them would have been cleaner, but wasn't possible as qapi-types.py was a program, not a module. Commit efd2eaa6c2 "qapi: De-duplicate enum code generation" de-duplicated by moving them to qapi.py, which was a module. Since then, program qapi-types.py has morphed into module types.py. It's where gen_enum() and gen_enum_lookup() started, and where they belong. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20191018074345.24034-6-armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/events.py')
-rw-r--r--scripts/qapi/events.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/qapi/events.py b/scripts/qapi/events.py
index 7308e8e..a716a1d 100644
--- a/scripts/qapi/events.py
+++ b/scripts/qapi/events.py
@@ -13,6 +13,7 @@ See the COPYING file in the top-level directory.
"""
from qapi.common import *
+from qapi.types import gen_enum, gen_enum_lookup
def build_event_send_proto(name, arg_type, boxed):