Marc-André Lureau <marcandre.lur...@gmail.com> writes:

> Hi
>
> On Tue, Aug 9, 2016 at 12:07 PM Markus Armbruster <arm...@redhat.com> wrote:
>
>> marcandre.lur...@redhat.com writes:
>>
>> > From: Marc-André Lureau <marcandre.lur...@redhat.com>
>> >
>> > 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é Lureau <marcandre.lur...@redhat.com>
>>
>> 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.

We have plenty of functions with external linkage that you're not
supposed to call directly.

It's nice to give things internal linkage.  But I don't want to
complicate the QAPI schema language just so we can give a few more
functions internal linkage.  Functions that have had external linkage
forever, which has caused us no problems at all.

>                     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);

I'm afraid I'm not getting this part...

Reply via email to