qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 24/32] qmp: Replace monitor_json_emitter{, raw}(


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 24/32] qmp: Replace monitor_json_emitter{, raw}() by qmp_{queue, send}_response()
Date: Mon, 2 Jul 2018 21:25:13 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/02/2018 11:22 AM, Markus Armbruster wrote:
monitor_json_emitter() and monitor_json_emitter_raw() are
unnecessarily general: they can send arbitrary JSON values, even
though we only ever use them for QMP, which may send only JSON
objects.

Specialize the argument from QObject * to QDict *, and rename to
qmp_queue_response(), qmp_send_response().

All callers but one lose an upcast.  The lone exception gains a
downcast; the next commit will get rid of it.

Signed-off-by: Markus Armbruster <address@hidden>
---
  monitor.c | 21 ++++++++++-----------
  1 file changed, 10 insertions(+), 11 deletions(-)


Reviewed-by: Eric Blake <address@hidden>

And the new names are easier to tell apart.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]