From 3a259b8ee79fcd00c14b379354757e40e04db893 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 9 May 2012 19:33:33 +0100 Subject: [PATCH] Cleanup return value wrapping. --- wrappers/trace.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wrappers/trace.py b/wrappers/trace.py index e82bd2c..d209051 100644 --- a/wrappers/trace.py +++ b/wrappers/trace.py @@ -416,7 +416,6 @@ class Tracer: print ' %s _result;' % function.type self.traceFunctionImplBody(function) if function.type is not stdapi.Void: - self.wrapRet(function, "_result") print ' return _result;' print '}' print @@ -437,6 +436,8 @@ class Tracer: if function.type is not stdapi.Void: self.serializeRet(function, "_result") print ' trace::localWriter.endLeave();' + if function.type is not stdapi.Void: + self.wrapRet(function, "_result") def invokeFunction(self, function, prefix='_', suffix=''): if function.type is stdapi.Void: @@ -589,11 +590,11 @@ class Tracer: self.wrapArg(method, arg) if method.type is not stdapi.Void: - print ' trace::localWriter.beginReturn();' - self.serializeValue(method.type, "_result") - print ' trace::localWriter.endReturn();' - self.wrapValue(method.type, '_result') + self.serializeRet(method, '_result') print ' trace::localWriter.endLeave();' + if method.type is not stdapi.Void: + self.wrapRet(method, '_result') + if method.name == 'Release': assert method.type is not stdapi.Void print ' if (!_result)' -- 2.45.2