From: Stefan Behnel Date: Sat, 4 Dec 2010 05:55:55 +0000 (+0100) Subject: fix line number reporting in AST stack traces X-Git-Tag: 0.14.alpha0~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7dc3409cb01b97fc1cc7376316864e55b01891a8;p=cython.git fix line number reporting in AST stack traces --- diff --git a/Cython/Compiler/Visitor.py b/Cython/Compiler/Visitor.py index 411500a8..dddef04e 100644 --- a/Cython/Compiler/Visitor.py +++ b/Cython/Compiler/Visitor.py @@ -105,7 +105,7 @@ class TreeVisitor(object): code = frame.f_code method_name = code.co_name pos = (os.path.basename(code.co_filename), - code.co_firstlineno) + frame.f_lineno) nodes.append((node, method_name, pos)) last_traceback = stacktrace stacktrace = stacktrace.tb_next