mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-04-29 14:56:23 +00:00
qapi: Simplify c_enum_const()
Backports commit 02e20c7e593363c564aae96e3c5bdc58630ce584 from qemu
This commit is contained in:
parent
b0adaeb172
commit
e339979717
|
@ -960,6 +960,4 @@ def camel_to_upper(value):
|
||||||
return new_name.lstrip('_').upper()
|
return new_name.lstrip('_').upper()
|
||||||
|
|
||||||
def c_enum_const(type_name, const_name):
|
def c_enum_const(type_name, const_name):
|
||||||
abbrev_string = camel_to_upper(type_name)
|
return camel_to_upper(type_name + '_' + const_name)
|
||||||
value_string = camel_to_upper(const_name)
|
|
||||||
return "%s_%s" % (abbrev_string, value_string)
|
|
||||||
|
|
Loading…
Reference in a new issue