summaryrefslogtreecommitdiffstats
path: root/scripts/qapi.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-05-14 06:50:50 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-14 18:20:51 +0200
commit7c81c61f9c2274f66ba947eafd9618d60da838a6 (patch)
treeaef903dac8e222731ff992e8cbe7b9473c9f527a /scripts/qapi.py
parentfa6068a1e8ef3c878ac9ee2399bb01eeaf61c366 (diff)
downloadhqemu-7c81c61f9c2274f66ba947eafd9618d60da838a6.zip
hqemu-7c81c61f9c2274f66ba947eafd9618d60da838a6.tar.gz
qapi: Rename generate_enum_full_value() to c_enum_const()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r--scripts/qapi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 7330f7c..1258f76 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -960,7 +960,7 @@ def camel_to_upper(value):
new_name += c
return new_name.lstrip('_').upper()
-def generate_enum_full_value(enum_name, enum_value):
- abbrev_string = camel_to_upper(enum_name)
- value_string = camel_to_upper(enum_value)
+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)
OpenPOWER on IntegriCloud