Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 65383:292b1df01bad
Fix imp_cache_from_source(): Decode make_compiled_pathname() result from the
filesystem encoding instead of utf-8.
imp_cache_from_source() encodes the input path to filesystem encoding and this
path is passed to make_compiled_pathname().
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Fri, 15 Oct 2010 22:46:07 +0000 |
| parents | 90052889ce3d |
| children | f98c3e2fd055 |
line wrap: on
line diff
--- a/Python/import.c Fri Oct 15 22:43:10 2010 +0000 +++ b/Python/import.c Fri Oct 15 22:46:07 2010 +0000 @@ -3483,7 +3483,7 @@ PyErr_Format(PyExc_SystemError, "path buffer too short"); return NULL; } - return PyUnicode_FromString(buf); + return PyUnicode_DecodeFSDefault(buf); } PyDoc_STRVAR(doc_cache_from_source,
