From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtcKl-0001EC-EJ for qemu-devel@nongnu.org; Tue, 03 Nov 2015 09:13:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtcKh-0007pA-48 for qemu-devel@nongnu.org; Tue, 03 Nov 2015 09:13:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtcKg-0007op-Pm for qemu-devel@nongnu.org; Tue, 03 Nov 2015 09:13:07 -0500 References: <871tc8tnsl.fsf@blackfin.pond.sub.org> <1446504092-29008-2-git-send-email-eblake@redhat.com> <87611jjq98.fsf@blackfin.pond.sub.org> <5638B613.2020402@redhat.com> <87mvuvch9x.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <5638C0E8.1020102@redhat.com> Date: Tue, 3 Nov 2015 07:12:56 -0700 MIME-Version: 1.0 In-Reply-To: <87mvuvch9x.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SmDV1kgT8AqSB7tq8thcvRjxlaQX0W15K" Subject: Re: [Qemu-devel] [PATCH v8.5 1/4] qapi: Drop all_members parameter from check() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Michael Roth This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SmDV1kgT8AqSB7tq8thcvRjxlaQX0W15K Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/03/2015 07:02 AM, Markus Armbruster wrote: >>> I'm afraid you're omitting a few steps here, and I think you missed >>> QAPISchemaObjectVariants.check()'s self.tag_member.check(). >> >> There is no self.tag_member.check(), any more; rather, my earlier >> patches have reworked things so that tag_member is checked by the owne= r >> (a flat union's base type, a simple union's local_members, or directly= >> in QAPISchemaAlternateType prior to calling Variants.check()). I gues= s >> that's a pitfall of seeing this patch without my rework of 5/17 to >> address your comments there. >=20 > I'm assuming this patch is based on > [PATCH v8 06/17] qapi-types: Consolidate gen_struct() and gen_union() > which has >=20 > def check(self, schema, members, seen): > if self.tag_name: # flat union > self.tag_member =3D seen[self.tag_name] > elif seen: # simple union > assert self.tag_member in seen.itervalues() > else: # alternate > ---> self.tag_member.check(schema, members, seen) >=20 > in QAPISchemaObjectTypeVariants. That was true in v8, but not in my pending v9 which did essentially what your 7/7 did (move the tag_member.check() into Alternate.check() back in patch 5). At any rate, my first glance of your series shows that it is reasonable, so my task today is to spit out a v9 of my series, but using your seven patches in place of my four. > Yes, we're almost certainly headed in the same direction. But I got > thoroughly confused and lost in the details on the way, so I had to hac= k > things up myself to clear my head. The result looks nice to me, so I'l= l > send it out in a jiffie in the hope you'll find it useful. >=20 Yes, it should make v9 easier when it includes your patches, because then you know what to look for :) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --SmDV1kgT8AqSB7tq8thcvRjxlaQX0W15K Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWOMDoAAoJEKeha0olJ0NqUroIAKGNz3MGf1tV/a2F9E+yC1Wm 1nbFM7GAbd1ol1I6jOljn4aenEu2VjBYMNVZSg8leM/QarvsH3twU7DdjccEcHYR wXxL9CKeUWAsRrZ+Ssjhlww0bZoD/hSioh2ZBOZJT7iVwfvqOqcSisw7z5kex+Du pPWDiTXWNF8EyHtSBu9n4iyzyZF0+j6F+nXjsBwQoQdt06tcplSWD29epmwvcClf PBCEXEojYJktcqIHgkRbBbAqyyjZpZ6rCabZBdz0h3irW0+hNvH9F0ccPPft1aGJ JHgXlcrx2JEDyerAfPIaIrlS49OXgmftSa/zTW4NUWAdFB4K6ZXKXTTnnVO69jI= =UqtI -----END PGP SIGNATURE----- --SmDV1kgT8AqSB7tq8thcvRjxlaQX0W15K--