X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fretrace.py;h=cd5ef1d2136770f21c5097f0480c6c8b661059d7;hb=3801952b80cd7a7160f6410518f6e3740d461b60;hp=1e39d42a19346d9f3b6be8f226a6c44bc88a8158;hpb=dbf714bb5a9bd14e08defced32871f6a0ecf5e72;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