diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-15 22:46:07 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-15 22:46:07 +0000 |
commit | 88bd891e6c536cec0b53d2a52115f44f8498c331 (patch) | |
tree | 7c0c0e68b27c44e0588919e27520724350228174 /Python/import.c | |
parent | 1a5630326f0992db78949a378a32b4979517e200 (diff) | |
download | cpython-git-88bd891e6c536cec0b53d2a52115f44f8498c331.tar.gz |
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().
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c index 857529370f..94363deae0 100644 --- a/Python/import.c +++ b/Python/import.c @@ -3483,7 +3483,7 @@ imp_cache_from_source(PyObject *self, PyObject *args, PyObject *kws) PyErr_Format(PyExc_SystemError, "path buffer too short"); return NULL; } - return PyUnicode_FromString(buf); + return PyUnicode_DecodeFSDefault(buf); } PyDoc_STRVAR(doc_cache_from_source, |