qemu-e2k/scripts/qapi
Markus Armbruster 61bfb2e1a4 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>
2019-10-22 09:26:12 +02:00
..
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-02 13:14:09 -06:00
commands.py qapi: Permit 'boxed' with empty type 2019-09-24 14:07:22 +02:00
common.py qapi: Move gen_enum(), gen_enum_lookup() back to qapi/types.py 2019-10-22 09:26:12 +02:00
doc.py qapi: Don't suppress doc generation without pragma doc-required 2019-10-22 09:26:12 +02:00
events.py qapi: Move gen_enum(), gen_enum_lookup() back to qapi/types.py 2019-10-22 09:26:12 +02:00
introspect.py qapi: Add feature flags to struct types 2019-06-12 18:34:26 +02:00
types.py qapi: Move gen_enum(), gen_enum_lookup() back to qapi/types.py 2019-10-22 09:26:12 +02:00
visit.py qapi: Add feature flags to struct types 2019-06-12 18:34:26 +02:00