projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c81c61
)
qapi: Simplify c_enum_const()
author
Markus Armbruster
<armbru@redhat.com>
Thu, 14 May 2015 12:50:51 +0000
(06:50 -0600)
committer
Markus Armbruster
<armbru@redhat.com>
Thu, 14 May 2015 16:20:54 +0000
(18:20 +0200)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
scripts/qapi.py
patch
|
blob
|
history
diff --git
a/scripts/qapi.py
b/scripts/qapi.py
index
1258f76
..
b917cad
100644
(file)
--- 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)