summaryrefslogtreecommitdiff
path: root/retrace.py
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2011-10-05 08:05:26 +0100
committerJosé Fonseca <jose.r.fonseca@gmail.com>2011-10-05 08:05:26 +0100
commite7c7d642a450730c29700827c32be6ee0cdee61e (patch)
tree228a948fea381f1a16172191b00bec12dfa1dc79 /retrace.py
parentaf7e64a9c2ec95d7a9e6e3f4fb0eceb8aa6a87e2 (diff)
Revert "Plug leaks in glretrace."
This reverts commit 568b271fe00e9489761d2b96a89bdfbfd709953a, which got committed by mistake, as it is still experimental work.
Diffstat (limited to 'retrace.py')
-rw-r--r--retrace.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/retrace.py b/retrace.py
index edfc079..724f522 100644
--- a/retrace.py
+++ b/retrace.py
@@ -70,7 +70,7 @@ class ValueExtractor(stdapi.Visitor):
print ' const Trace::Array *__a%s = dynamic_cast<const Trace::Array *>(&%s);' % (array.id, rvalue)
print ' if (__a%s) {' % (array.id)
length = '__a%s->values.size()' % array.id
- print ' __allocator(%s, %s);' % (lvalue, length)
+ print ' %s = new %s[%s];' % (lvalue, array.type, length)
index = '__j' + array.id
print ' for (size_t {i} = 0; {i} < {length}; ++{i}) {{'.format(i = index, length = length)
try:
@@ -84,7 +84,7 @@ class ValueExtractor(stdapi.Visitor):
def visit_pointer(self, pointer, lvalue, rvalue):
print ' const Trace::Array *__a%s = dynamic_cast<const Trace::Array *>(&%s);' % (pointer.id, rvalue)
print ' if (__a%s) {' % (pointer.id)
- print ' __allocator(%s);' % (lvalue,)
+ print ' %s = new %s;' % (lvalue, pointer.type)
try:
self.visit(pointer.type, '%s[0]' % (lvalue,), '*__a%s->values[0]' % (pointer.id,))
finally:
@@ -193,8 +193,6 @@ class Retracer:
print ' (void)call;'
return
- print ' scoped_allocator __allocator;'
- print ' (void)__allocator;'
success = True
for arg in function.args:
arg_type = ConstRemover().visit(arg.type)
@@ -280,7 +278,6 @@ class Retracer:
print '#include "trace_parser.hpp"'
print '#include "retrace.hpp"'
- print '#include "scoped_allocator.hpp"'
print
types = api.all_types()