From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zty8y-0002tG-Hc for qemu-devel@nongnu.org; Wed, 04 Nov 2015 08:30:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zty8v-0006Qi-5W for qemu-devel@nongnu.org; Wed, 04 Nov 2015 08:30:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zty8v-0006Qe-0H for qemu-devel@nongnu.org; Wed, 04 Nov 2015 08:30:25 -0500 From: Markus Armbruster References: <1446618049-13596-1-git-send-email-eblake@redhat.com> <1446618049-13596-14-git-send-email-eblake@redhat.com> Date: Wed, 04 Nov 2015 14:30:21 +0100 In-Reply-To: <1446618049-13596-14-git-send-email-eblake@redhat.com> (Eric Blake's message of "Tue, 3 Nov 2015 23:20:35 -0700") Message-ID: <87bnb9opsi.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v9 13/27] qapi: Drop obsolete tag value collision assertions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, Michael Roth Eric Blake writes: > From: Markus Armbruster > > 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 > Message-Id: <1446559499-26984-1-git-send-email-armbru@redhat.com> > [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 > > --- > 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