Mercurial > cpython-lru_cache-weakref
diff Python/codecs.c @ 85280:5e679ef2a55c 2.7
Issue #13461: Fix a crash in the TextIOWrapper.tell method and in the "replace"
error handler on 64-bit platforms. Patch by Yogesh Chaudhari.
| author | Serhiy Storchaka <storchaka@gmail.com> |
|---|---|
| date | Tue, 20 Aug 2013 20:08:53 +0300 |
| parents | 719ee60fc5e2 |
| children |
line wrap: on
line diff
--- a/Python/codecs.c Mon Aug 19 23:20:07 2013 +0300 +++ b/Python/codecs.c Tue Aug 20 20:08:53 2013 +0300 @@ -521,7 +521,7 @@ Py_UNICODE res = Py_UNICODE_REPLACEMENT_CHARACTER; if (PyUnicodeDecodeError_GetEnd(exc, &end)) return NULL; - return Py_BuildValue("(u#n)", &res, 1, end); + return Py_BuildValue("(u#n)", &res, (Py_ssize_t)1, end); } else if (PyObject_IsInstance(exc, PyExc_UnicodeTranslateError)) { PyObject *res;
