From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZI0Ij-0008K2-EV for qemu-devel@nongnu.org; Wed, 22 Jul 2015 16:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZI0Ig-0005u5-81 for qemu-devel@nongnu.org; Wed, 22 Jul 2015 16:07:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZI0Ig-0005u0-2b for qemu-devel@nongnu.org; Wed, 22 Jul 2015 16:07:34 -0400 References: <1435782155-31412-1-git-send-email-armbru@redhat.com> <1435782155-31412-27-git-send-email-armbru@redhat.com> <55AFD438.2090303@redhat.com> From: Eric Blake Message-ID: <55AFF7FE.7010906@redhat.com> Date: Wed, 22 Jul 2015 14:07:26 -0600 MIME-Version: 1.0 In-Reply-To: <55AFD438.2090303@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Gh3h7RnoQp1pFWnF0E3vCd8QUC1Tkm68h" Subject: Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, berto@igalia.com, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Gh3h7RnoQp1pFWnF0E3vCd8QUC1Tkm68h Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/22/2015 11:34 AM, Eric Blake wrote: >=20 > -typedef struct int32List { > +typedef struct boolList boolList; > + > +struct boolList { >=20 > I can understand the minor change in #ifdef name, and even the > separation between typedef and struct declaration (even though the old > approach of doing it all at once works). Actually, I don't see any clear-cut policy on the matter (all HACKING says is that "Typedefs are used to eliminate the redundant 'struct' keyword", but does not say how aggressively they must be used). In fact, it looks like most of qemu.git prefers the more compact representation, while your patch goes to the less-common one: $ git grep 'typedef struct .* {' | wc 1370 5549 71105 $ git grep 'typedef struct .*;' | wc 624 2515 41449 However, one thing that your style has going for it, that was not possible with the compact version, is to use: typedef struct intList intList; struct intList { union { int64_t value; uint64_t padding; }; - struct intList *next; + intList *next; }; that is, because your typedef is separate, you have the option of being able to drop the use of 'struct' from within the actual intList struct. Again, if we want that, it would be better to do that as a separate comm= it. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Gh3h7RnoQp1pFWnF0E3vCd8QUC1Tkm68h 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/ iQEcBAEBCAAGBQJVr/f/AAoJEKeha0olJ0NqIwgH/3paIidvP65n8N21Y1DhOp8J vgu9Xc5cQzgLe9hfvwaI+VGj/hEoTJ3OkPhnOtD9u+P7AyNyOy3NE/FWtqckd6OV 8jUpcgGUkH6z3hBQIoUr4aPue1w8YR89RWSWNIo+Bcmz8azBEJBHviw2ACxgrG3N W8sX29y3Sr6SvXC0/mWWUZJPIlcPSX6Kdibf9BPTKGdHVCkGlmi8XnxsZIlqdB0L 1x0OidXB+cx2mWSXf1Q3hJPHQJAxgMqkZZT1QFl2pE54besTT4k/0wXNNslW8i1J iswN7edYiRxLAD1X6Q9fjAOpr80IiQTQt7aphPLwAy5oCXy925oNgmf/CUd8Vic= =e6UF -----END PGP SIGNATURE----- --Gh3h7RnoQp1pFWnF0E3vCd8QUC1Tkm68h--