qapi: Simplify c_enum_const()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
7c81c61f9c
commit
02e20c7e59
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user