diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-15 20:40:55 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-15 20:40:55 +0100 |
commit | 1a11faf52590fae1e61f304835b27c42ed21b1dd (patch) | |
tree | 26e2407e597236789b5bfa10ae98bad8d95a560f /Python/import.c | |
parent | 1a238237f0304a03e73e464b069a2a4aec4beb3c (diff) | |
download | cpython-1a11faf52590fae1e61f304835b27c42ed21b1dd.tar.gz |
Fix regression under Windows following b75b41237380 (from issue #13392)
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c index 3c3e504e28..64197d7a48 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'); |