From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ae7Xf-0006gf-D4 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:50:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ae7Xc-0006aJ-56 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:50:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ae7Xb-0006aE-V8 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:50:40 -0500 References: <1457571335-10938-1-git-send-email-eblake@redhat.com> <1457571335-10938-14-git-send-email-eblake@redhat.com> <87k2laozfq.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <56E1DE1E.9000608@redhat.com> Date: Thu, 10 Mar 2016 13:50:38 -0700 MIME-Version: 1.0 In-Reply-To: <87k2laozfq.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mEgCuTqfTXgXQMoSbg9RbRuhuTLJ0itkg" Subject: Re: [Qemu-devel] [PATCH v5 13/14] qapi: Allow anonymous base for flat union List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Michael Roth This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mEgCuTqfTXgXQMoSbg9RbRuhuTLJ0itkg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/10/2016 01:22 PM, Markus Armbruster wrote: > Eric Blake writes: >=20 >> Rather than requiring all flat unions to explicitly create >> a separate base struct, we can allow the qapi schema to specify >> the common members via an inline dictionary. This is similar to >> how commands can specify an inline anonymous type for its 'data'. >> We already have several struct types that only exist to serve as >> a single flat union's base; the next commit will clean them up >> (in particular, the doc change to the BlockdevOptions example in >> this patch will be reflected to QMP in the next). >=20 > The parenthesis is a bit cryptic. "Reflected"? Maybe s/reflected to/implemented in/ would read better. >=20 >> Now that anonymous bases are legal, we need to rework the >> flat-union-bad-base negative test (as previously written, it >> forms what is now valid QAPI; tweak it to now provide coverage >> of a new error message path), and add a positive test in >> qapi-schema-test to use an anonymous base (making the integer >> argument optional, for even more coverage). >> >> Note that this patch only allows anonymous bases for flat unions; >> simple unions are already enough syntactic sugar that we do not >> want to burden them further. Meanwhile, while it would be easy >> to also allow an anonymous base for structs, that would be quite >> redundant, as the members can be put right into the struct >> instead. >> >> Signed-off-by: Eric Blake >=20 > Patch looks good. >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --mEgCuTqfTXgXQMoSbg9RbRuhuTLJ0itkg 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/ iQEcBAEBCAAGBQJW4d4eAAoJEKeha0olJ0Nq6t0IAKAHniL7QoxX2jSiD16I6khs o9sob9VJqcP/ILhiKa82B4NvHydu0gb+Pci2UGIHAOj42aAl9SS2lbulreDnDbVq 6tx1545eShho7uWj+THxZg59y+NzIWbPW6iX1u5aRQTFTHuAgDFQlQtZFIWvRT1r cNpxNrfrawLL5xChAXQZdgE66J234uJOhxfxSu+ZXLfBE6rvbS+BQDu4cus2FnxG eZ7KMlnIvw3ITGTcOww65BjkK1cdgr6UU7PdFGhLfZS4pWW2H5MJPYYuEYncFUEI rQfnzrIBUs4GVky7/L+Mr/kY72zKAb60V0XipoI6CRTPkCgVWa4AImbFISazljg= =LUX5 -----END PGP SIGNATURE----- --mEgCuTqfTXgXQMoSbg9RbRuhuTLJ0itkg--