diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-06-12 05:53:00 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-06-12 05:53:00 (GMT) |
commit | 427dbff8f04a3a34703bf8a1faec77ad334f1d01 (patch) | |
tree | 2b0d4f1b998364fcca10f1cd5f064c7c81cbd624 /Python/import.c | |
parent | 543c09e7004173a7504b004fc1c4bba695b3be5f (diff) | |
download | cpython-427dbff8f04a3a34703bf8a1faec77ad334f1d01.zip cpython-427dbff8f04a3a34703bf8a1faec77ad334f1d01.tar.gz cpython-427dbff8f04a3a34703bf8a1faec77ad334f1d01.tar.bz2 |
Revert 55876. Use PyUnicode_AsEncodedString instead.
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/import.c b/Python/import.c index 0e4e50c..4786f1b 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2305,10 +2305,10 @@ ensure_fromlist(PyObject *mod, PyObject *fromlist, char *buf, Py_ssize_t buflen, if (!Py_FileSystemDefaultEncoding) { item8 = PyUnicode_EncodeASCII(PyUnicode_AsUnicode(item), PyUnicode_GetSize(item), - "strict"); + NULL); } else { - item8 = PyUnicode_AsEncodedObject(item, - Py_FileSystemDefaultEncoding, "strict"); + item8 = PyUnicode_AsEncodedString(item, + Py_FileSystemDefaultEncoding, NULL); } if (!item8) { PyErr_SetString(PyExc_ValueError, "Cannot encode path item"); |