]> git.cworth.org Git - apitrace/blobdiff - wrappers/trace.py
gltrace: Expose marker functions when tracing is disabled.
[apitrace] / wrappers / trace.py
index 4abd20eeb6920f72ca6e80548b1d7c14ebee97cf..31087e92b722c9ef4b6991078172a67551d1500f 100644 (file)
@@ -474,7 +474,7 @@ class Tracer:
 
         # No-op if tracing is disabled
         print '    if (!trace::isTracingEnabled()) {'
-        Tracer.invokeFunction(self, function)
+        self.doInvokeFunction(function)
         if function.type is not stdapi.Void:
             print '        return _result;'
         else:
@@ -512,7 +512,11 @@ class Tracer:
                 self.wrapRet(function, "_result")
             print '    trace::localWriter.endLeave();'
 
-    def invokeFunction(self, function, prefix='_', suffix=''):
+    def invokeFunction(self, function):
+        self.doInvokeFunction(function)
+
+    def doInvokeFunction(self, function, prefix='_', suffix=''):
+        # Same as invokeFunction() but called both when trace is enabled or disabled.
         if function.type is stdapi.Void:
             result = ''
         else: