]> git.cworth.org Git - apitrace/blobdiff - retrace/retrace.py
d3dretrace: Prevent ScopedAllocator::alloc<D3DPRESENT_PARAMETERS> clash.
[apitrace] / retrace / retrace.py
index 1e39d42a19346d9f3b6be8f226a6c44bc88a8158..cd5ef1d2136770f21c5097f0480c6c8b661059d7 100644 (file)
@@ -66,10 +66,10 @@ class ValueAllocator(stdapi.Visitor):
         pass
 
     def visitArray(self, array, lvalue, rvalue):
-        print '    %s = _allocator.alloc<%s>(&%s);' % (lvalue, array.type, rvalue)
+        print '    %s = static_cast<%s *>(_allocator.alloc(&%s, sizeof *%s));' % (lvalue, array.type, rvalue, lvalue)
 
     def visitPointer(self, pointer, lvalue, rvalue):
-        print '    %s = _allocator.alloc<%s>(&%s);' % (lvalue, pointer.type, rvalue)
+        print '    %s = static_cast<%s *>(_allocator.alloc(&%s, sizeof *%s));' % (lvalue, pointer.type, rvalue, lvalue)
 
     def visitIntPointer(self, pointer, lvalue, rvalue):
         pass