Commit 8115a6c6 authored by Stefan Behnel's avatar Stefan Behnel

fix "debug_trace_code_generation": use truncating instead of just seeking...

fix "debug_trace_code_generation": use truncating instead of just seeking which is not enough to remove an unused marker as it may not get overwritten afterwards
parent 92866c52
......@@ -125,9 +125,10 @@ def write_func_call(func, codewriter_class):
res = func(*args, **kwds)
code.call_level -= 4
if start == code.buffer.stream.tell():
code.buffer.stream.seek(pristine)
# no code written => undo writing marker
code.buffer.stream.truncate(pristine)
else:
marker = marker.replace('->', '<-')
marker = marker.replace('->', '<-', 1)
code.putln(marker)
return res
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment