Fix regression under Windows following b75b41237380 (from issue #13392)

This commit is contained in:
Antoine Pitrou 2011-11-15 20:40:55 +01:00
parent 28e401e717
commit 1d8f3f451c
1 changed files with 5 additions and 0 deletions

View File

@ -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');