aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-06-27 17:21:12 +0200
committerMarkus Armbruster <armbru@redhat.com>2015-09-04 15:47:15 +0200
commite02bca281c82f874d84578af4deea46142232115 (patch)
tree9f26c29f92e446f918041b909c549e4250a8b8e0
parent8102307f51e68280ac965a140a87073d5c31e9a5 (diff)
qapi-commands: Inline gen_marshal_output_call()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
-rw-r--r--scripts/qapi-commands.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 3965ca8e9a..6de5229694 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -57,19 +57,15 @@ def gen_sync_call(name, args, ret_type):
name=c_name(name), args=arglist, retval=retval).rstrip()
if ret_type:
ret += "\n" + gen_err_check('local_err')
- ret += "\n" + mcgen('''
-%(marshal_output_call)s
+ ret += mcgen('''
+
+qmp_marshal_output_%(c_name)s(retval, ret, &local_err);
''',
- marshal_output_call=gen_marshal_output_call(name, ret_type)).rstrip()
+ c_name=c_name(name))
pop_indent()
return ret.rstrip()
-def gen_marshal_output_call(name, ret_type):
- if not ret_type:
- return ""
- return "qmp_marshal_output_%s(retval, ret, &local_err);" % c_name(name)
-
def gen_visitor_input_containers_decl(args):
ret = ""