From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjU8M-00065w-DV for qemu-devel@nongnu.org; Mon, 12 Sep 2016 12:31:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjU8I-0005Ku-Ip for qemu-devel@nongnu.org; Mon, 12 Sep 2016 12:31:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjU8I-0005Ka-EA for qemu-devel@nongnu.org; Mon, 12 Sep 2016 12:30:58 -0400 Date: Mon, 12 Sep 2016 17:30:53 +0100 From: "Daniel P. Berrange" Message-ID: <20160912163053.GO16124@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> <20160912162347.GN16124@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160912162347.GN16124@redhat.com> 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: Paolo Bonzini , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , qemu-devel@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= , Max Reitz On Mon, Sep 12, 2016 at 05:23:47PM +0100, Daniel P. Berrange wrote: > 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? >=20 > Yes indeed :-) >=20 > 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. Oh and obviously my commit message needs fixing to say QObjectInputVisitor not QmpInputVisitor now :-) 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 :|