Browse Source

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>
Luiz Capitulino 14 years ago
parent
commit
d2a80d6bb3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/qapi-types.py

+ 1 - 1
scripts/qapi-types.py

@@ -70,7 +70,7 @@ def generate_enum_lookup(name, values):
         ret += mcgen('''
     "%(value)s",
 ''',
-                     value=c_var(value).lower())
+                     value=value.lower())
 
     ret += mcgen('''
     NULL,