From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN1AJ-0002Ye-SK for qemu-devel@nongnu.org; Wed, 05 Aug 2015 12:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZN1AF-00065T-72 for qemu-devel@nongnu.org; Wed, 05 Aug 2015 12:03:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN1AE-00065A-Ui for qemu-devel@nongnu.org; Wed, 05 Aug 2015 12:03:35 -0400 References: <1438703896-12553-1-git-send-email-armbru@redhat.com> <1438703896-12553-12-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <55C233D0.3070801@redhat.com> Date: Wed, 5 Aug 2015 10:03:28 -0600 MIME-Version: 1.0 In-Reply-To: <1438703896-12553-12-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KcFnQmd59xvpxbou6v6IIUGbxW5jgxxLE" Subject: Re: [Qemu-devel] [PATCH RFC v3 11/32] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs 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) --KcFnQmd59xvpxbou6v6IIUGbxW5jgxxLE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/04/2015 09:57 AM, Markus Armbruster wrote: > Fixes flat unions to visit the base's base members (the previous > commit merely added them to the struct). Same test case. >=20 > Patch's effect on visit_type_UserDefFlatUnion(): >=20 > static void visit_type_UserDefFlatUnion_fields(Visitor *m, UserDef= FlatUnion **obj, Error **errp) > { > Error *err =3D NULL; >=20 > + visit_type_int(m, &(*obj)->integer, "integer", &err); > + if (err) { > + goto out; > + } > visit_type_str(m, &(*obj)->string, "string", &err); > if (err) { > goto out; >=20 > Test cases updated for the bug fix. >=20 > Fixes alternates to generate a visitor for their implicit enumeration > type. None of them are currently used, obviously. Example: > block-core.json's BlockdevRef now generates > visit_type_BlockdevRefKind(). >=20 > Signed-off-by: Markus Armbruster > --- > scripts/qapi-visit.py | 260 +++++++++++++-----------= -------- > tests/qapi-schema/qapi-schema-test.json | 3 - > tests/test-qmp-input-strict.c | 2 +- > tests/test-qmp-input-visitor.c | 4 +- > 4 files changed, 106 insertions(+), 163 deletions(-) >=20 > + > +# If you link code generated from multiple schemata, you want only one= > +# instance include the code generated for built-in types. Generate it= > +# only when do_builtins, enabled by command line option -b. See also > +# QAPISchemaGenVisitVisitor.visit_end(). > do_builtins =3D False again, s/include/of/ and you can add: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --KcFnQmd59xvpxbou6v6IIUGbxW5jgxxLE 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/ iQEcBAEBCAAGBQJVwjPQAAoJEKeha0olJ0NqhQwH/jPpi5EVa6aATigix7rmN5Kt uVjI0oP9oxRvrLLvvi7EK2jB5XRo2VypL6znkYOzqkbeF6+1WgdluLL02jy0qOxY I3MAsAXqLiJX1COFs9AOLW2JQa+eBjHBQe4otLMKf+ZtAo3OqR43NWFHN8yU+aeE EXDGQVD5XpxnJUm0PPhIL7K71jncYufTLRAODajPlgt2YAA05vYK5r/x1+PPB5Wk xL+Va8LBNZhl1pI9ACryoVFvuoW3YUwaKfcId40S2plQgJT8wYCk7GeI4bgkRXIF oWKLgzlgnbcnp4kifQNTnrrJ9KEGJ/Er0DcY8XlzSWxJ19Ga1Wq1fDxo1/xUAh0= =Osg0 -----END PGP SIGNATURE----- --KcFnQmd59xvpxbou6v6IIUGbxW5jgxxLE--