From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMbuo-0003YD-4P for qemu-devel@nongnu.org; Tue, 04 Aug 2015 09:06:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMbui-0004Di-0w for qemu-devel@nongnu.org; Tue, 04 Aug 2015 09:05:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMbuh-0004D9-Ru for qemu-devel@nongnu.org; Tue, 04 Aug 2015 09:05:51 -0400 References: <1435782155-31412-1-git-send-email-armbru@redhat.com> <1435782155-31412-20-git-send-email-armbru@redhat.com> <55AE84BA.3070807@redhat.com> <874mkqt453.fsf@blackfin.pond.sub.org> <871tfje80d.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <55C0B08A.8070802@redhat.com> Date: Tue, 4 Aug 2015 06:31:06 -0600 MIME-Version: 1.0 In-Reply-To: <871tfje80d.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Mgwp20KmAxiMHr2LQ7Dq1eUbQcO4eIAcm" Subject: Re: [Qemu-devel] [PATCH RFC v2 19/47] qapi: Generated code cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, berto@igalia.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Mgwp20KmAxiMHr2LQ7Dq1eUbQcO4eIAcm Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/04/2015 03:08 AM, Markus Armbruster wrote: > Markus Armbruster writes: >=20 >> Eric Blake writes: >> >>> On 07/01/2015 02:22 PM, Markus Armbruster wrote: > [...] >>>> @@ -105,7 +103,8 @@ struct %(name)s >>>> =20 >>>> def generate_enum_lookup(name, values): >>>> ret =3D mcgen(''' >>>> -const char * const %(name)s_lookup[] =3D { >>>> + >>>> +const char *const %(name)s_lookup[] =3D { >>> >>> [2] generated diffs like this: >>> >>> qapi-types.c: >>> -const char * const OnOffAuto_lookup[] =3D { >>> +const char *const OnOffAuto_lookup[] =3D { >>> >>> Hmm - we already failed to update docs/qapi-code-gen.txt in the past;= we >>> added a const in commit 2e4450ff that is missing from the documentati= on. >> >> Minor review fail. Not the first time. >=20 > I take that back, it's actually not visible in qapi-code-gen.txt. Oh, you're right - the only mention of *_lookup[] in the docs file is the array generated for all events, and that one was output with correct spacing (until the rest of your series fixes it to share code rather than duplicate things with slight differences). Maybe we SHOULD be showing what the generators do for enums, unions, and alternates (by expanding the example-schema.json that is then fed to all the example script usage). But that's fine as a project for another day. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Mgwp20KmAxiMHr2LQ7Dq1eUbQcO4eIAcm 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/ iQEcBAEBCAAGBQJVwLCPAAoJEKeha0olJ0NqGlcIAK5PZco9c4qQ72/m+S8nlSfq ZDV30hLSXnTqq2XnOv5rAuJCNQmQM0o8Y9ww/kLuXEZ4Z4eJFy+HcnHzQoLVdx+b /yK+49KRygKiE/t+HSLuk/bQthAB3Fxjds82tfx75P1gcmJHbZPZAH9K3+Qtx3Wr 0LQpIwcP3th5Hg3cV5C3qrzK/WiPI1r9Zhj4F/Q99fKoVr+FImahYFoUBXLLbMzH /Bh0K5bjh2T36M3MxJuXetEDthUPJNoAVmgtUXVP9LvnpT/J6VePyxPoondmzTx8 QJw/4OI7/yrhpqArA3xWz0qZ+BF5g8bfSwXdaI7irz/9zGzmK+MSmQddC7maXrU= =wbHJ -----END PGP SIGNATURE----- --Mgwp20KmAxiMHr2LQ7Dq1eUbQcO4eIAcm--