Skip to content

Commit

Permalink
Cleanup return value wrapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfonseca committed May 9, 2012
1 parent f9e11f9 commit 3a259b8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions wrappers/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ def traceFunctionImpl(self, function):
print ' %s _result;' % function.type
self.traceFunctionImplBody(function)
if function.type is not stdapi.Void:
self.wrapRet(function, "_result")
print ' return _result;'
print '}'
print
Expand All @@ -437,6 +436,8 @@ def traceFunctionImplBody(self, function):
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:
Expand Down Expand Up @@ -589,11 +590,11 @@ def implementWrapperInterfaceMethodBody(self, interface, base, method):
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)'
Expand Down

0 comments on commit 3a259b8

Please sign in to comment.