From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw1Np-0007CG-K2 for qemu-devel@nongnu.org; Tue, 10 Nov 2015 00:22:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw1Nl-0006i4-K2 for qemu-devel@nongnu.org; Tue, 10 Nov 2015 00:22:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw1Nl-0006hz-ER for qemu-devel@nongnu.org; Tue, 10 Nov 2015 00:22:13 -0500 References: <1446791754-23823-1-git-send-email-eblake@redhat.com> <1446791754-23823-25-git-send-email-eblake@redhat.com> <87r3jzgwf3.fsf@blackfin.pond.sub.org> <5640D99D.1020006@redhat.com> <87egfz7ztc.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <56417F03.90705@redhat.com> Date: Mon, 9 Nov 2015 22:22:11 -0700 MIME-Version: 1.0 In-Reply-To: <87egfz7ztc.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e00oEba2ltlfcooVbKtKoenVHfepOKLQ4" Subject: Re: [Qemu-devel] [PATCH v10 24/30] qapi: Factor out QAPISchemaObjectType.check_clash() 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) --e00oEba2ltlfcooVbKtKoenVHfepOKLQ4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/09/2015 12:11 PM, Markus Armbruster wrote: > Eric Blake writes: >=20 >> On 11/09/2015 06:00 AM, Markus Armbruster wrote: >>> Eric Blake writes: >>> >>>> Consolidate two common sequences of clash detection into a >>>> new QAPISchemaObjectType.check_clash() helper method. >>>> >>>> No change to generated code. >>>> >>>> Signed-off-by: Eric Blake >>>> @@ -980,11 +980,7 @@ class QAPISchemaObjectType(QAPISchemaType): >>>> seen =3D OrderedDict() >>>> if self._base_name: >>>> self.base =3D schema.lookup_type(self._base_name) >>>> - assert isinstance(self.base, QAPISchemaObjectType) >>> >>> This assertion is lost. >>> >> >> Directly lost, but indirectly still present. The new code is calling >> QAPISchemaObjectType.check_clash(), which won't exist unless self.base= >> is a QAPISchemaObjectType. >=20 > or a QAPISchemaObjectTypeMember, or a QAPISchemaObjectVariants, or > whatever else acquires the method in the future. >=20 >=20 > Maybe, but the isinstance(self.base, QAPISchemaObjectType) will come > right back anyway when we move the "'base' for FOO cannot use BAR type"= > check from the old semantic analysis into the check methods. Until > then, it makes sense at least as a place holder. Good point, I'll add it back in. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --e00oEba2ltlfcooVbKtKoenVHfepOKLQ4 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/ iQEcBAEBCAAGBQJWQX8EAAoJEKeha0olJ0NqTfAIAIHVRvN4BqkT8Ldd2Ds1L/av 4NbR2pCHuIySd6pEPPUk1j6oHXwVVOwpRsTtGEmJJe+dFG4T9yyrFzVM42goaBT8 tlZJIG/YUMNHNhG9F4lHbDODM7vca59f8DeWSQ4JEuvTbkD6QlPkBuX12t5OuLx7 KVFLRcWWnDN9eeuzWpevuKIyaPnkJOxUMsj81eXqoRzMtqzk6s2YFVyVmKr6BBEy Tj136ipO7/aT1mC0KY8R7rDfG1dX4eiVY78f5eVPhSjNuzT0A7QFIJWMuGfNnk2x l0Zw1AJ5uh86mCgBiWzB3Pj4eQslGsvZMQJpHqukKkoVwfdLB8cVjUQugpobSqo= =/Abj -----END PGP SIGNATURE----- --e00oEba2ltlfcooVbKtKoenVHfepOKLQ4--