From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX2YO-0006h1-Bp for qemu-devel@nongnu.org; Tue, 09 Aug 2016 04:38:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bX2YM-000840-9t for qemu-devel@nongnu.org; Tue, 09 Aug 2016 04:38:27 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36465) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX2YL-00083p-VX for qemu-devel@nongnu.org; Tue, 09 Aug 2016 04:38:26 -0400 Received: by mail-wm0-x244.google.com with SMTP id i138so1676237wmf.3 for ; Tue, 09 Aug 2016 01:38:25 -0700 (PDT) MIME-Version: 1.0 References: <20160808141439.16908-1-marcandre.lureau@redhat.com> <20160808141439.16908-6-marcandre.lureau@redhat.com> <87lh06iczk.fsf@dusky.pond.sub.org> In-Reply-To: <87lh06iczk.fsf@dusky.pond.sub.org> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Tue, 09 Aug 2016 08:38:14 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 05/15] qapi: add 'export-marshal' command key List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org Hi On Tue, Aug 9, 2016 at 12:07 PM Markus Armbruster wrote= : > marcandre.lureau@redhat.com writes: > > > From: Marc-Andr=C3=A9 Lureau > > > > When a command sets the 'export-marshal' key to true, the generated > > marshaller will be exported, so it can be called from outside. > > > > Signed-off-by: Marc-Andr=C3=A9 Lureau > > Sure we need to make linkage configurable in the schema? Why can't we > simply make all the marshallers extern? > Why would you expose all marshallers if you don't have to? Also, they shouldn't be called directly, but through qmp_dispatch() which does preliminary checks. Alternatively, we could save the marshaller call: return qobject_from_jsonf("{'QMP': {'version': {'qemu': " "{'micro': %d. 'minor': %d, 'major': %d}," "'package': '%s'}, " "'capabilities': []}}", QEMU_VERSION_MICRO, QEMU_VERSION_MINOR, QEMU_VERSION_MAJOR, QEMU_PKGVERSION); --=20 Marc-Andr=C3=A9 Lureau