mirror of https://github.com/xemu-project/xemu.git
![]() Rather than using just an array of strings, make enum.values be an array of the new QAPISchemaMember type, and add a helper member_names() method to get back at the original list of names. Likewise, creating an enum requires wrapping strings, via a new QAPISchema._make_enum_members() method. The benefit of wrapping enum members in a QAPISchemaMember Python object is that we now share the existing code for C name clash detection (although the code is not yet active until a later commit removes the earlier ad hoc parser checks). In a related change, the QAPISchemaMember._pretty_owner() method needs to learn about one more implicit type name: the generated enum associated with a simple union. In the interest of keeping the changes of this patch local to one file, the visitor interface still passes just a list of names rather than the full list of QAPISchemaMember instances. We may want to revisit this in the future, if the consistency with visit_object_type() is worth it. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1449033659-25497-12-git-send-email-eblake@redhat.com> [Eric's simplifying followup squashed in] Signed-off-by: Markus Armbruster <armbru@redhat.com> |
||
---|---|---|
.. | ||
kvm | ||
qemu-guest-agent | ||
qemugdb | ||
qmp | ||
tracetool | ||
acpi_extract.py | ||
acpi_extract_preprocess.py | ||
analyse-9p-simpletrace.py | ||
analyze-migration.py | ||
check-qerror.sh | ||
checkpatch.pl | ||
cleanup-trace-events.pl | ||
cocci-macro-file.h | ||
coverity-model.c | ||
create_config | ||
disas-objdump.pl | ||
dump-guest-memory.py | ||
extract-vsssdk-headers | ||
feature_to_c.sh | ||
get_maintainer.pl | ||
gtester-cat | ||
hxtool | ||
make-release | ||
make_device_config.sh | ||
ordereddict.py | ||
qapi-commands.py | ||
qapi-event.py | ||
qapi-introspect.py | ||
qapi-types.py | ||
qapi-visit.py | ||
qapi.py | ||
qemu-binfmt-conf.sh | ||
qemu-gdb.py | ||
qtest.py | ||
refresh-pxe-roms.sh | ||
shaderinclude.pl | ||
signrom.py | ||
simpletrace.py | ||
switch-timer-api | ||
texi2pod.pl | ||
tracetool.py | ||
update-acpi.sh | ||
update-linux-headers.sh | ||
vmstate-static-checker.py |