diff options
-rw-r--r-- | scripts/qapi-types.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 3bacc0c0da..f64d84c39e 100644 --- a/scripts/qapi-types.py +++ b/scripts/qapi-types.py @@ -91,8 +91,11 @@ typedef enum %(name)s ''', name=name) + # append automatically generated _MAX value + enum_values = values + [ 'MAX' ] + i = 0 - for value in values: + for value in enum_values: enum_decl += mcgen(''' %(abbrev)s_%(value)s = %(i)d, ''', |