From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfYKq-0002x3-GV for qemu-devel@nongnu.org; Fri, 25 Sep 2015 15:07:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfYKm-0007vl-48 for qemu-devel@nongnu.org; Fri, 25 Sep 2015 15:07:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfYKl-0007va-Sv for qemu-devel@nongnu.org; Fri, 25 Sep 2015 15:07:04 -0400 References: <1442872682-6523-1-git-send-email-eblake@redhat.com> <1442872682-6523-10-git-send-email-eblake@redhat.com> <87h9misalf.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <56059B51.4050701@redhat.com> Date: Fri, 25 Sep 2015 13:06:57 -0600 MIME-Version: 1.0 In-Reply-To: <87h9misalf.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Pcx6f4rPlOh2DnURtOX2JG9XQmRfpcoG3" Subject: Re: [Qemu-devel] [PATCH v5 09/46] qapi: Use consistent generated code patterns List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: marcandre.lureau@redhat.com, DirtY.iCE.hu@gmail.com, qemu-devel@nongnu.org, ehabkost@redhat.com, Michael Roth This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Pcx6f4rPlOh2DnURtOX2JG9XQmRfpcoG3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/25/2015 10:54 AM, Markus Armbruster wrote: > Eric Blake writes: >=20 >> We had some pointless differences in the generated code for visit, >> command marshalling, and events; unifying them makes it easier for >> future patches to consolidate to common helper functions. >> - Consistently name the error variable 'err' >=20 > Before the patch, qapi-event.py consistently uses local_err, and > qapi-commands.py uses both names. I like your change. >=20 >> - Consistently use the labels 'out' and 'out_obj' >=20 > Before, qapi-event.py consistently uses 'clean', and qapi-visit.py uses= > both 'out_obj' and 'out_end'. Good change. >=20 >> - If allocation fails, jump to the right label rather than >> indenting everything else >=20 > Good idea. Just one instance, in gen_visit_union(). >=20 > Not mentioned: name the Visitor * parameter 'v' instead of 'm'. Whoops - I merged several patches from v4 into just this one for v5, but forgot to update the commit message to match. > No idea > where that 'm' comes from, but it has spilled over into qom/object.c an= d > qom/qom-object.c. Let's ignore that for now. I didn't even notice that. >=20 >> No change in semantics to the generated code. >=20 > Yes, but you need to update docs/qapi-code-gen.txt. Indeed. >=20 > Pretty mechanical changes. They look good to me, but as always, this > kind is easier to review when you do exactly one mechanical change per > patch. Sounds like my merge was premature; I'll split this back out into separate patches, and update the docs to match (where things are affected - our docs don't give any examples of the C code for visiting a union). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Pcx6f4rPlOh2DnURtOX2JG9XQmRfpcoG3 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/ iQEcBAEBCAAGBQJWBZtRAAoJEKeha0olJ0Nqb4wH/jyOiUyPzLSU345Fb42HOb2C EapRGCczaZOOMkDvO6l890tlD88HK7thqWLqWrVFvuAc9NS7r3U4uUd4NKoY9qMX g5e7HBhwjKVGnQrTVCYDY/rjHgVMW6+B+76wUYtBnSVRl746/ceikoBtlkROKOfj v+4hSLLMpMlpyThxbkRqf1sJ+8VwR7cfHQRIM7lwGRWCECcme8NqKBhYdHSa3ZjE WcjF41xvsKqWO225KF739/Uk/f332pasIeZBbZk1pVpvdEU5YcC9jBNrvI6/iQYC Uz7HwxaDI5MoV5n2T64PEY9JnWgdtwvAnKGCWv/wUH/obO0y1GUXeop8yOTryZU= =HKmU -----END PGP SIGNATURE----- --Pcx6f4rPlOh2DnURtOX2JG9XQmRfpcoG3--