summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authorMartin Raum <martin@raum-brothers.eu>2014-08-14 17:08:23 +0200
committerMartin Raum <martin@raum-brothers.eu>2014-08-14 17:08:23 +0200
commit705e2d2ec1bff344949a80476fb1c7272991aa71 (patch)
tree76e29f94e715d8716dbd9b16751c239c3f31710e /Cython/Compiler/ModuleNode.py
parentd5af12c4bd2b56bb9362c9cf0131c0ec514db2e4 (diff)
downloadcython-705e2d2ec1bff344949a80476fb1c7272991aa71.tar.gz
Table of file names with absolute paths.
The table of file names written to the c or cpp file contains absolute file paths. This affects, in particular, profiling. The c method __pyx_TraceCall takes as one of its arguments a file name, which will be read from the table of file names.
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r--Cython/Compiler/ModuleNode.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index a3000fced..cf55d3d8f 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -687,7 +687,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln("static const char *%s[] = {" % Naming.filetable_cname)
if code.globalstate.filename_list:
for source_desc in code.globalstate.filename_list:
- filename = os.path.basename(source_desc.get_filenametable_entry())
+ filename = os.path.abspath(source_desc.get_filenametable_entry())
escaped_filename = filename.replace("\\", "\\\\").replace('"', r'\"')
code.putln('"%s",' % escaped_filename)
else: