Commit 705e2d2e authored by Martin Raum's avatar Martin Raum

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.
parent d5af12c4
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment