[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/18] qapi: export the marshallers
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 08/18] qapi: export the marshallers |
Date: |
Mon, 19 Sep 2016 18:41:24 +0200 |
From: Marc-André Lureau <address@hidden>
Make it possible to call marshallers manually, without going through
qmp_dispatch(). (this is currently only possible in middle-mode, but
it's also useful in general)
Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
scripts/qapi-commands.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index a06a2c4..b150db9 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -84,10 +84,7 @@ static void qmp_marshal_output_%(c_name)s(%(c_type)s ret_in,
QObject **ret_out,
def gen_marshal_proto(name):
- ret = 'void qmp_marshal_%s(QDict *args, QObject **ret, Error **errp)' %
c_name(name)
- if not middle_mode:
- ret = 'static ' + ret
- return ret
+ return 'void qmp_marshal_%s(QDict *args, QObject **ret, Error **errp)' %
c_name(name)
def gen_marshal_decl(name):
@@ -222,8 +219,7 @@ class QAPISchemaGenCommandVisitor(QAPISchemaVisitor):
if ret_type and ret_type not in self._visited_ret_types:
self._visited_ret_types.add(ret_type)
self.defn += gen_marshal_output(ret_type)
- if middle_mode:
- self.decl += gen_marshal_decl(name)
+ self.decl += gen_marshal_decl(name)
self.defn += gen_marshal(name, arg_type, boxed, ret_type)
if not middle_mode:
self._regy += gen_register_command(name, success_response)
--
2.5.5
- [Qemu-devel] [PULL 00/18] QAPI patches for 2016-09-19, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 03/18] qapi-schema: add 'device_add', Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 05/18] monitor: register gen:false commands manually, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 08/18] qapi: export the marshallers,
Markus Armbruster <=
- [Qemu-devel] [PULL 10/18] monitor: implement 'qmp_query_commands' without qmp_cmds, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 13/18] qapi: check invalid arguments on no-args commands, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 14/18] tests: add a test to check invalid args, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 04/18] monitor: simplify invalid_qmp_mode(), Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 01/18] build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO}, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 06/18] qapi: Support unregistering QMP commands, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 02/18] qapi-schema: use generated marshaller for 'qmp_capabilities', Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 17/18] qmp-commands.hx: fix some styling, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 16/18] build-sys: remove qmp-commands-old.h, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 12/18] qapi: remove the "middle" mode, Markus Armbruster, 2016/09/19