fix line number reporting in AST stack traces
authorStefan Behnel <scoder@users.berlios.de>
Sat, 4 Dec 2010 05:55:55 +0000 (06:55 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 4 Dec 2010 05:55:55 +0000 (06:55 +0100)
Cython/Compiler/Visitor.py

index 411500a8c493bd07626bb1d96e248b3db075d90c..dddef04e491332875ade97e77888f359f6e4f34e 100644 (file)
@@ -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