From 7dc3409cb01b97fc1cc7376316864e55b01891a8 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 4 Dec 2010 06:55:55 +0100 Subject: [PATCH] fix line number reporting in AST stack traces --- Cython/Compiler/Visitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.26.2