From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZccYN-00046l-9J for qemu-devel@nongnu.org; Thu, 17 Sep 2015 13:01:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZccYK-0001mx-1P for qemu-devel@nongnu.org; Thu, 17 Sep 2015 13:00:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZccYJ-0001mp-Qa for qemu-devel@nongnu.org; Thu, 17 Sep 2015 13:00:55 -0400 References: <1442401589-24189-1-git-send-email-armbru@redhat.com> <1442401589-24189-7-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <55FAF1C2.7010401@redhat.com> Date: Thu, 17 Sep 2015 11:00:50 -0600 MIME-Version: 1.0 In-Reply-To: <1442401589-24189-7-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="E6PggH4kQ1xRg8V7nfnswDi2Rh7pBa1VE" Subject: Re: [Qemu-devel] [PATCH v8 06/26] 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: mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --E6PggH4kQ1xRg8V7nfnswDi2Rh7pBa1VE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/16/2015 05:06 AM, Markus Armbruster wrote: > Fixes flat unions to get the base's base members. Test case is from > commit 2fc0043, in qapi-schema-test.json: >=20 > { 'union': 'UserDefFlatUnion', > 'base': 'UserDefUnionBase', > 'discriminator': 'enum1', > 'data': { 'value1' : 'UserDefA', > 'value2' : 'UserDefB', > 'value3' : 'UserDefB' } } >=20 > { 'struct': 'UserDefUnionBase', > 'base': 'UserDefZero', > 'data': { 'string': 'str', 'enum1': 'EnumOne' } } >=20 > { 'struct': 'UserDefZero', > 'data': { 'integer': 'int' } } >=20 > Patch's effect on UserDefFlatUnion: >=20 > struct UserDefFlatUnion { > /* Members inherited from UserDefUnionBase: */ > + int64_t integer; > char *string; There is another change not listed here. When you were developing with scaffolding patches, you split the 'typedef struct UserDefFlatUnion {' into two lines in that patch, and then the diff seen by this patch when generating the commit message didn't see anything change. But now that you reverted the scaffolding out of the series, it is now THIS patch that is converting from inline: typedef struct UserDefFlatUnion { =2E.. } UserDefFlatUnion; to the separate: typedef struct UserDefFlatUnion; =2E.. struct UserDefFlatUnion { =2E.. }; > -def generate_fwd_struct(name): > +def gen_fwd_object_or_array(name): > return mcgen(''' > =20 > typedef struct %(name)s %(name)s; > - > -typedef struct %(name)sList { > - union { > - %(name)s *value; > - uint64_t padding; > - }; > - struct %(name)sList *next; > -} %(name)sList; > ''', > name=3Dc_name(name)) > =20 > -def generate_fwd_enum_struct(name): > +def gen_array(name, element_type): > return mcgen(''' > =20 > -typedef struct %(name)sList { > +struct %(name)s { My R-b still stands, but it would be nice to update this commit message to reflect that this change was intentional. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --E6PggH4kQ1xRg8V7nfnswDi2Rh7pBa1VE 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/ iQEcBAEBCAAGBQJV+vHCAAoJEKeha0olJ0Nqzu0H/2sJlVM82F7uiPanbXF3czei w2Kaa2enj0Jr5OAUXoh8xMQcKZy+pznVXcRB3F4+ffyNMg/20GArHUnuRGJ4mB6K 1E8vkbFY3wnSYJ2PDfFLkAjs4DfxFZOAYMIME9MgpTrEzt5OaxyGooQYeM5P7JWE PiYsmSLYC4QmhiHiPXp9uFRousVIg0UQs29iE8vfOdRWlYexex/0OjRoIUG5bUBa JFy342a+uTauFs8E8RWmVIurESx1H8CGUa+kVgVdNMgNrtP2G8asWUAvzbvaXrBf oGgGD6VW5f+caJlgIDUvyQf8HxRhwDAug6g5g69/r1o7X2TcncE//nlNwh0sK4c= =EHpi -----END PGP SIGNATURE----- --E6PggH4kQ1xRg8V7nfnswDi2Rh7pBa1VE--