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 | a60b1fe637f31ae904edfd9a8d6bf0f27876cf19 (patch) | |
tree | 9b0b820e4bda965783125712e6643f1acf03e5bf | |
parent | 945d344cd37199efcb802161c0f813628311195f (diff) | |
download | cpython-a60b1fe637f31ae904edfd9a8d6bf0f27876cf19.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().
-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, |