aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r--scripts/qapi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 3e5caa8193..9c541e0312 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -918,7 +918,7 @@ class QAPISchemaEnumType(QAPISchemaType):
return c_name(self.name)
def c_null(self):
- return c_enum_const(self.name, (self.values + ['MAX'])[0],
+ return c_enum_const(self.name, (self.values + ['_MAX'])[0],
self.prefix)
def json_type(self):
@@ -1568,7 +1568,7 @@ const char *const %(c_name)s_lookup[] = {
''',
index=index, value=value)
- max_index = c_enum_const(name, 'MAX', prefix)
+ max_index = c_enum_const(name, '_MAX', prefix)
ret += mcgen('''
[%(max_index)s] = NULL,
};
@@ -1579,7 +1579,7 @@ const char *const %(c_name)s_lookup[] = {
def gen_enum(name, values, prefix=None):
# append automatically generated _MAX value
- enum_values = values + ['MAX']
+ enum_values = values + ['_MAX']
ret = mcgen('''