mirror of
https://github.com/qemu/qemu.git
synced 2025-08-02 04:35:42 +00:00
qapi: Don't use c_var() on enum strings
Otherwise if we have something like 'foo-bar' in the schema, it will be generated as 'foo_bar' in the string lookup table. c_var() is good for C variables, but not for enum strings. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
e1bc2f7b3f
commit
d2a80d6bb3
@ -70,7 +70,7 @@ def generate_enum_lookup(name, values):
|
|||||||
ret += mcgen('''
|
ret += mcgen('''
|
||||||
"%(value)s",
|
"%(value)s",
|
||||||
''',
|
''',
|
||||||
value=c_var(value).lower())
|
value=value.lower())
|
||||||
|
|
||||||
ret += mcgen('''
|
ret += mcgen('''
|
||||||
NULL,
|
NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user