summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Armbruster2015-05-14 14:50:51 +0200
committerMarkus Armbruster2015-05-14 18:20:54 +0200
commit02e20c7e593363c564aae96e3c5bdc58630ce584 (patch)
tree1428b8dfa39925ab8c0e2824ddd36b57ca33c921 /scripts
parentqapi: Rename generate_enum_full_value() to c_enum_const() (diff)
downloadqemu-02e20c7e593363c564aae96e3c5bdc58630ce584.tar.gz
qemu-02e20c7e593363c564aae96e3c5bdc58630ce584.tar.xz
qemu-02e20c7e593363c564aae96e3c5bdc58630ce584.zip
qapi: Simplify c_enum_const()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 1258f762ba..b917cadf75 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -961,6 +961,4 @@ def camel_to_upper(value):
return new_name.lstrip('_').upper()
def c_enum_const(type_name, const_name):
- abbrev_string = camel_to_upper(type_name)
- value_string = camel_to_upper(const_name)
- return "%s_%s" % (abbrev_string, value_string)
+ return camel_to_upper(type_name + '_' + const_name)