From: Gary Furnish Date: Sat, 26 Apr 2008 21:55:38 +0000 (-0600) Subject: Fixed issues with -w X-Git-Tag: 0.9.6.14~14 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=5fb3f95fd7df33625db6e7cbe4a9b1c0c4b7141c;p=cython.git Fixed issues with -w --- 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):