summaryrefslogtreecommitdiff
path: root/scripts/qapi-types.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-09-19 16:31:06 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2012-09-26 10:45:02 -0300
commiteda50a656f52a5172fa8a95f7b217565b90d413e (patch)
tree2a057d7c6a8525f04c9b86984ca18c407010f1e1 /scripts/qapi-types.py
parentf513cbf7503d8db3778df436beaf25f3d8260317 (diff)
qapi: do not protect enum values from namespace pollution
Enum values are always preceded by the uppercase name of the enum, so they do not conflict with reserved words. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'scripts/qapi-types.py')
-rw-r--r--scripts/qapi-types.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index 49ef569a2f..1b84834959 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -91,9 +91,9 @@ const char *%(name)s_lookup[] = {
def generate_enum_name(name):
if name.isupper():
- return c_fun(name)
+ return c_fun(name, False)
new_name = ''
- for c in c_fun(name):
+ for c in c_fun(name, False):
if c.isupper():
new_name += '_'
new_name += c