From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpiGO-0000cZ-2v for qemu-devel@nongnu.org; Fri, 23 Oct 2015 15:44:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpiGK-0005uH-S8 for qemu-devel@nongnu.org; Fri, 23 Oct 2015 15:44:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpiGK-0005uC-K6 for qemu-devel@nongnu.org; Fri, 23 Oct 2015 15:44:28 -0400 References: <1445576998-2921-1-git-send-email-eblake@redhat.com> <1445576998-2921-8-git-send-email-eblake@redhat.com> <87pp05g0jd.fsf@blackfin.pond.sub.org> <562A45A5.8050908@redhat.com> <87wpud8nq1.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <562A8E16.5020509@redhat.com> Date: Fri, 23 Oct 2015 13:44:22 -0600 MIME-Version: 1.0 In-Reply-To: <87wpud8nq1.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MmTLx7VdFtrSRnfrc2PnTNmAg9VplsJO5" Subject: Re: [Qemu-devel] [PATCH v10 07/25] qapi-visit: Split off visit_type_FOO_fields forward decl 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) --MmTLx7VdFtrSRnfrc2PnTNmAg9VplsJO5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/23/2015 12:05 PM, Markus Armbruster wrote: >>>> def gen_visit_struct_fields(name, base, members): >>>> - struct_fields_seen.add(name) >>>> - >>>> ret =3D '' >>>> >>>> if base: >>>> ret +=3D gen_visit_implicit_struct(base) >>>> >>>> + struct_fields_seen.add(name) >>>> ret +=3D mcgen(''' >>>> >>> >>> Minor cleanup not mentioned in commit message. Okay. >> >> Not minor, and I probably should mention it explicitly in the message.= I >> moved it to make sure that gen_visit_implicit_struct() properly emits = a >> forward declaration when necessary; we must not modify >> struct_fields_seen any sooner than when the next thing in the output >> stream is either the forward declaration or the implementation. >=20 > The proper place for the .add() is right next to where the thing it > tracks gets done, no argument. >=20 > I believe your cleanup makes an actual difference only when > gen_visit_implicit_struct(base) can call gen_visit_struct_fields(name).= > Obviously impossible now, which is why I called it "minor". Oh, I was probably confusing that the implicit struct is for a different type (base) than what we are adding to struct_fields_seen (name). >=20 > PATCH 10 will drop the code between the old spot and the new spot. > Unless something between this patch and PATCH 10 depends on this > cleanup, I'd simply leave it dirty until then. Indeed, dropping this hunk and letting subsequent cleanup do it right makes no difference. Will add it to my fixup queue. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --MmTLx7VdFtrSRnfrc2PnTNmAg9VplsJO5 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/ iQEcBAEBCAAGBQJWKo4WAAoJEKeha0olJ0Nq7uEH+wV0AWM5HODIwJNh+9tb4Yzp wWn0DObR1phyX2tmALDymFkBLrjCiGNim8CHMmNSSlLQbbR1WZRYbFwrlh+cjJbR SRTcJOLb2ufz/bKuqcKeP3r1TkknZfDQoHGO5OPUPqZkfSzOdiQ/ZpP4qc0YnxtI CLC2yY1Q+Pk1WcKK1rnC+qrEWcG8Z/aQLtcdc5m7GBOqYXe3ITu0mQoZVspeBceI RnTodpjvuWRJ6FAmZUre50sUQ6dTAOOOOvNq9Z0OC0MMlvjwz4EsWlQcE2QhVx+y d5Wn3IYcVjXAiFkJtQh7WxfUeWijYneNho5hnqf0L7vQWKQ4d9uX00O5cHJeIwk= =g83g -----END PGP SIGNATURE----- --MmTLx7VdFtrSRnfrc2PnTNmAg9VplsJO5--