qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]