summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-10-15 22:46:07 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-10-15 22:46:07 (GMT)
commit88bd891e6c536cec0b53d2a52115f44f8498c331 (patch)
tree7c0c0e68b27c44e0588919e27520724350228174 /Python
parent1a5630326f0992db78949a378a32b4979517e200 (diff)
downloadcpython-88bd891e6c536cec0b53d2a52115f44f8498c331.zip
cpython-88bd891e6c536cec0b53d2a52115f44f8498c331.tar.gz
cpython-88bd891e6c536cec0b53d2a52115f44f8498c331.tar.bz2
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')
-rw-r--r--Python/import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index 8575293..94363de 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,