X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fretrace.py;h=cd5ef1d2136770f21c5097f0480c6c8b661059d7;hb=b080de4420648a49acad4950868522075c6f84c8;hp=1e39d42a19346d9f3b6be8f226a6c44bc88a8158;hpb=d1623a2829191e6837d89bc2022ee1495f3d5aee;p=apitrace diff --git a/retrace/retrace.py b/retrace/retrace.py index 1e39d42..cd5ef1d 100644 --- a/retrace/retrace.py +++ b/retrace/retrace.py @@ -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