]> Git Repo - qemu.git/commitdiff
qapi: export the marshallers
authorMarc-André Lureau <[email protected]>
Mon, 12 Sep 2016 09:19:03 +0000 (13:19 +0400)
committerMarkus Armbruster <[email protected]>
Mon, 19 Sep 2016 15:32:21 +0000 (17:32 +0200)
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 <[email protected]>
Message-Id: <20160912091913[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
scripts/qapi-commands.py

index a06a2c4f9b1af843490cfcbe8228b47b8da29435..b150db9792216efa8eac52fd91c3ea3a5028a9d3 100644 (file)
@@ -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)
This page took 0.027435 seconds and 4 git commands to generate.