aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi-commands.py
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-09-12 13:19:03 +0400
committerMarkus Armbruster <armbru@redhat.com>2016-09-19 17:32:21 +0200
commitb804dc3bcddce6d0cd58e3c66cb0ee5b282b9e14 (patch)
treeb11647854a868d44d2695369eaef87e46f0a151e /scripts/qapi-commands.py
parent5032a16d1d44cc805ea0240903dc8dc98294da1f (diff)
qapi: export the marshallers
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 <marcandre.lureau@redhat.com> Message-Id: <20160912091913.15831-9-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi-commands.py')
-rw-r--r--scripts/qapi-commands.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index a06a2c4f9b..b150db9792 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)