From 5fb3f95fd7df33625db6e7cbe4a9b1c0c4b7141c Mon Sep 17 00:00:00 2001 From: Gary Furnish Date: Sat, 26 Apr 2008 15:55:38 -0600 Subject: [PATCH] Fixed issues with -w --- Cython/Compiler/Nodes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 54c58b0f..522b50c0 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -18,7 +18,7 @@ import ControlFlow from DebugFlags import debug_disposal_code -absolute_path_length = len(os.path.abspath('.')) +absolute_path_length = 0 def relative_position(pos): """ @@ -36,6 +36,9 @@ def relative_position(pos): AUTHOR: William Stein """ + global absolute_path_length + if absolute_path_length==0: + absolute_path_length = len(os.path.abspath(os.getcwd())) return (pos[0][absolute_path_length+1:], pos[1]) def embed_position(pos, docstring): -- 2.26.2