mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 22:11:53 -06:00
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? Commit21cd70dfc1
"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. Commitefd2eaa6c2
"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>
This commit is contained in:
parent
f01338cce6
commit
61bfb2e1a4
3 changed files with 60 additions and 59 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue