From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAJnE-0004ba-8p for qemu-devel@nongnu.org; Tue, 07 Jun 2016 12:23:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAJnD-0004eg-49 for qemu-devel@nongnu.org; Tue, 07 Jun 2016 12:23:52 -0400 References: <1465294275-8733-1-git-send-email-berrange@redhat.com> <1465294275-8733-6-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <5756F511.7090204@redhat.com> Date: Tue, 7 Jun 2016 10:23:45 -0600 MIME-Version: 1.0 In-Reply-To: <1465294275-8733-6-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3BDDlVnbrx6wK4O9EVnvVlUcdqIoFqC5J" Subject: Re: [Qemu-devel] [PATCH v1 5/6] qapi: generate a qapi_stringify_TYPENAME method for all types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Max Reitz , Markus Armbruster , Michael Roth This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3BDDlVnbrx6wK4O9EVnvVlUcdqIoFqC5J Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/07/2016 04:11 AM, Daniel P. Berrange wrote: > There are sometimes cases where one might wish to have a > pretty string representation of a QAPI type. For example, > the 'qemu-img info' tool wants to print out ImageInfoSpecific > type in a humand friendly format. Also when debugging problems > in code it is often useful to insert code to print out a QAPI > object. >=20 > To address this, add a qapi_stringify_TYPENAME() method for > all types which wraps around the TextOutputVisitor to turn > objects into pretty strings. It might be nicer to copy the approach I used for the clone visitor, with a QAPI_CLONE() macro that forwards to a special-case helper (including necessary type-punning), rather than making a much larger .h with lots of declarations that aren't actually used. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3BDDlVnbrx6wK4O9EVnvVlUcdqIoFqC5J 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/ iQEcBAEBCAAGBQJXVvURAAoJEKeha0olJ0Nq6wsIAIr1Gvqljb72nhjE3S1UztDB wy23gAF17jxhQvQYSsfL45wyZv9HvRA1zz2xyhsFVSe56SiYfVpVrhl5AB07C1Wj 8cYN2cG85FT30lAZh9rNzTMlIBtRm/4e/25crJdRF65ldvDMzUUVhu1WoO47WC94 5Vh5rEL/LQtvaI7FbvgMgl9Ph60Rdpu2QDV6dR1e3NLfqHZ5rkAaZhE2ZEacbHXJ zmksfmI04evTU7tPn8bMsShjUqdtXiCILgtmVW/rOK+DaWyXLB1A7n9AzyFjLLYf 6mrlTX2nCBKY4IaJVpSTVXya/ITXbH58INw5nRlwPCgcIQUfJo+ZLaMqmVcJqBM= =/t80 -----END PGP SIGNATURE----- --3BDDlVnbrx6wK4O9EVnvVlUcdqIoFqC5J--