Commit ba465d1e authored by Stefan Behnel's avatar Stefan Behnel

fix tracing check outside of functions

parent e2a07e8d
......@@ -1503,7 +1503,8 @@ class CCodeWriter(object):
self.write("\n")
self.indent()
self.write("/* %s */\n" % self.marker[1])
if self.funcstate.can_trace and self.globalstate.directives['linetrace']:
if (self.funcstate and self.funcstate.can_trace
and self.globalstate.directives['linetrace']):
self.indent()
self.write('__Pyx_TraceLine(%d)\n' % self.marker[0])
self.last_marker_line = self.marker[0]
......
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