diff options
author | Eric Blake <eblake@redhat.com> | 2015-11-18 01:52:58 -0700 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-12-17 08:21:28 +0100 |
commit | 04e0639d4e77b6d55491d396c8aa13929ee8ed9a (patch) | |
tree | 5f783496f305fb28a9c91c6960a6226a845920ed /scripts/qapi.py | |
parent | 7fb1cf1606c78c9d5b538f29176fd5a101726a9d (diff) |
qapi: Remove obsolete tests for MAX collision
Now that we no longer collide with an implicit _MAX enum member,
we no longer need to reject it in the ad hoc parser, and can
remove several tests that are no longer needed.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1447836791-369-24-git-send-email-eblake@redhat.com>
[Commit message tweaked]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r-- | scripts/qapi.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py index 9c541e0312..6acef1f5f3 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -537,8 +537,6 @@ def check_event(expr, expr_info): global events name = expr['event'] - if name.upper() == 'MAX': - raise QAPIExprError(expr_info, "Event name 'MAX' cannot be created") events.append(name) check_type(expr_info, "'data' for event '%s'" % name, expr.get('data'), allow_dict=True, allow_optional=True, @@ -550,7 +548,7 @@ def check_union(expr, expr_info): base = expr.get('base') discriminator = expr.get('discriminator') members = expr['data'] - values = {'MAX': '(automatic)'} + values = {} # Two types of unions, determined by discriminator. @@ -629,7 +627,7 @@ def check_union(expr, expr_info): def check_alternate(expr, expr_info): name = expr['alternate'] members = expr['data'] - values = {'MAX': '(automatic)'} + values = {} types_seen = {} # Check every branch @@ -662,7 +660,7 @@ def check_enum(expr, expr_info): name = expr['enum'] members = expr.get('data') prefix = expr.get('prefix') - values = {'MAX': '(automatic)'} + values = {} if not isinstance(members, list): raise QAPIExprError(expr_info, |