Commit d49f604f 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

--HG--
extra : transplant_source : J%83%8Di%F7Q%E2%EDk%A1VgO%1A%E1%DE%CDrM%B8
parent 4d563553
......@@ -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