[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v9 13/27] qapi: Drop obsolete tag value collisio
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v9 13/27] qapi: Drop obsolete tag value collision assertions |
Date: |
Wed, 04 Nov 2015 14:30:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> From: Markus Armbruster <address@hidden>
>
> Union tag values can't clash with member names in generated C anymore
> since commit e4ba22b, but QAPISchemaObjectTypeVariant.check() still
> asserts they don't. Drop it.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> Message-Id: <address@hidden>
> [A later patch will still need to pass vseen from Variants.check()
> to Variant.check(), so to avoid churn, change the cleanup to occur
> lower in Variant.check()]
Leaves QAPISchemaObjectTypeVariant.check() parameter seen temporarily
unused. Okay, as long as we get in the patch that again uses it in the
same batch.
> Signed-off-by: Eric Blake <address@hidden>
>
> ---
> v9: new patch
> ---
> scripts/qapi.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/qapi.py b/scripts/qapi.py
> index a814e20..145dbfe 100644
> --- a/scripts/qapi.py
> +++ b/scripts/qapi.py
> @@ -1067,7 +1067,7 @@ class
> QAPISchemaObjectTypeVariant(QAPISchemaObjectTypeMember):
> QAPISchemaObjectTypeMember.__init__(self, name, typ, False)
>
> def check(self, schema, tag_type, seen):
> - QAPISchemaObjectTypeMember.check(self, schema, [], seen)
> + QAPISchemaObjectTypeMember.check(self, schema, [], {})
> assert self.name in tag_type.values
>
> # This function exists to support ugly simple union special cases
- [Qemu-devel] [PATCH v9 06/27] qapi: Test failure in middle of array parse, (continued)
- [Qemu-devel] [PATCH v9 06/27] qapi: Test failure in middle of array parse, Eric Blake, 2015/11/04
- [Qemu-devel] [PATCH v9 02/27] qapi: Strengthen test of TestStructList, Eric Blake, 2015/11/04
- [Qemu-devel] [PATCH v9 10/27] qapi: Track simple union tag in object.local_members, Eric Blake, 2015/11/04
- [Qemu-devel] [PATCH v9 09/27] qapi-introspect: Document lack of sorting, Eric Blake, 2015/11/04
- [Qemu-devel] [PATCH v9 14/27] qapi: Fix up commit 7618b91's clash sanity checking change, Eric Blake, 2015/11/04
- [Qemu-devel] [PATCH v9 13/27] qapi: Drop obsolete tag value collision assertions, Eric Blake, 2015/11/04
- Re: [Qemu-devel] [PATCH v9 13/27] qapi: Drop obsolete tag value collision assertions,
Markus Armbruster <=
- [Qemu-devel] [PATCH v9 03/27] qapi: Plug leaks in test-qmp-*, Eric Blake, 2015/11/04
[Qemu-devel] [PATCH v9 16/27] qapi: Eliminate QAPISchemaObjectType.check() variable members, Eric Blake, 2015/11/04
[Qemu-devel] [PATCH v9 11/27] qapi-types: Consolidate gen_struct() and gen_union(), Eric Blake, 2015/11/04
[Qemu-devel] [PATCH v9 24/27] qapi: Fix alternates that accept 'number' but not 'int', Eric Blake, 2015/11/04
[Qemu-devel] [PATCH v9 08/27] qapi: Provide nicer array names in introspection, Eric Blake, 2015/11/04
[Qemu-devel] [PATCH v9 01/27] qapi: Use generated TestStruct machinery in tests, Eric Blake, 2015/11/04