From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjU1U-0002XL-4G for qemu-devel@nongnu.org; Mon, 12 Sep 2016 12:23:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjU1P-00033z-UF for qemu-devel@nongnu.org; Mon, 12 Sep 2016 12:23:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjU1P-00033b-Oy for qemu-devel@nongnu.org; Mon, 12 Sep 2016 12:23:51 -0400 Date: Mon, 12 Sep 2016 17:23:47 +0100 From: "Daniel P. Berrange" Message-ID: <20160912162347.GN16124@redhat.com> Reply-To: "Daniel P. Berrange" References: <1473088600-17930-1-git-send-email-berrange@redhat.com> <1473088600-17930-6-git-send-email-berrange@redhat.com> <877fahozqr.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <877fahozqr.fsf@dusky.pond.sub.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v11 5/6] qapi: add a QmpInputVisitor that does string conversion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Max Reitz , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= On Mon, Sep 12, 2016 at 06:21:32PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: >=20 > > Currently the QmpInputVisitor assumes that all scalar > > values are directly represented as their final types. > > ie it assumes an 'int' is using QInt, and a 'bool' is > > using QBool. > > > > This adds an alternative constructor for QmpInputVisitor > > that will set it up such that it expects a QString for > > all scalar types instead. > > > > This makes it possible to use QmpInputVisitor with a > > QDict produced from QemuOpts, where everything is in > > string format. > > > > Reviewed-by: Marc-Andr=C3=A9 Lureau > > Signed-off-by: Daniel P. Berrange >=20 > Ignorant question: is this used by the next patch? Yes indeed :-) We use the qdict_crumpl() method to turn the command line QemuOpts into a QDict, and then this new mode for QmpInputVisitor for the visiting this QDict, thus eliminating need to use OptsVisitor in QOM. Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|