Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 73574:12940d9f8031
Fix regression under Windows following b75b41237380 (from issue #13392)
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Tue, 15 Nov 2011 20:40:55 +0100 |
| parents | b75b41237380 |
| children | cea2d28f2855 |
line wrap: on
line diff
--- a/Python/import.c Tue Nov 15 19:15:19 2011 +0100 +++ b/Python/import.c Tue Nov 15 20:40:55 2011 +0100 @@ -1267,6 +1267,11 @@ 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');
