summary refs log tree commit diff stats
path: root/scripts/qapi-types.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-05-14 06:50:52 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-14 18:20:57 +0200
commitb42e91484df9772bb0c26aa0f05390a92d564d6f (patch)
tree7953c324f269d9e45fe0375f83c0ac724cf2f1d0 /scripts/qapi-types.py
parent02e20c7e593363c564aae96e3c5bdc58630ce584 (diff)
downloadfocaccia-qemu-b42e91484df9772bb0c26aa0f05390a92d564d6f.tar.gz
focaccia-qemu-b42e91484df9772bb0c26aa0f05390a92d564d6f.zip
qapi: Use c_enum_const() in generate_alternate_qtypes()
Missed in commit b0b5819.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts/qapi-types.py')
-rw-r--r--scripts/qapi-types.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index 6ca48c11c0..9eb08a6266 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -180,11 +180,9 @@ const int %(name)s_qtypes[QTYPE_MAX] = {
         assert qtype, "Invalid alternate member"
 
         ret += mcgen('''
-    [ %(qtype)s ] = %(abbrev)s_KIND_%(enum)s,
+    [ %(qtype)s ] = %(enum_const)s,
 ''',
-        qtype = qtype,
-        abbrev = de_camel_case(name).upper(),
-        enum = c_name(de_camel_case(key),False).upper())
+        qtype = qtype, enum_const = c_enum_const(name + 'Kind', key))
 
     ret += mcgen('''
 };