Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 42057:3473a685e5e7
Revert 55876. Use PyUnicode_AsEncodedString instead.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Tue, 12 Jun 2007 05:53:00 +0000 |
| parents | cd125fe83051 |
| children | 825041fc8e2c |
line wrap: on
line diff
--- a/Python/import.c Tue Jun 12 00:41:35 2007 +0000 +++ b/Python/import.c Tue Jun 12 05:53:00 2007 +0000 @@ -2305,10 +2305,10 @@ 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");
