summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-11-15 19:40:55 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-11-15 19:40:55 (GMT)
commit1d8f3f451c45d01703f933a93766ecaff8018675 (patch)
tree19e28ace08950cfbaa73fde154fb9983e40d5edf /Python
parent28e401e7173fbd4c74140f0e5325bc9b4978ec65 (diff)
downloadcpython-1d8f3f451c45d01703f933a93766ecaff8018675.zip
cpython-1d8f3f451c45d01703f933a93766ecaff8018675.tar.gz
cpython-1d8f3f451c45d01703f933a93766ecaff8018675.tar.bz2
Fix regression under Windows following b75b41237380 (from issue #13392)
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 3c3e504..64197d7 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1267,6 +1267,11 @@ write_compiled_module(PyCodeObject *co, PyObject *cpathname,
PyErr_Clear();
return;
}
+ if (PyUnicode_CopyCharacters(cpathname_tmp, 0,
+ cpathname, 0, cpathname_len) < 0) {
+ PyErr_Clear();
+ return;
+ }
PyUnicode_WriteChar(cpathname_tmp, cpathname_len + 0, '.');
PyUnicode_WriteChar(cpathname_tmp, cpathname_len + 1, 't');
PyUnicode_WriteChar(cpathname_tmp, cpathname_len + 2, 'm');