summaryrefslogtreecommitdiff
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-08-20 20:08:53 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2013-08-20 20:08:53 +0300
commita9885e93eeecf799893dcfed59146f98859031f1 (patch)
tree76095f773981bfaccb8ac6588dcfc7ad9563bfc2 /Python/codecs.c
parent83737c632c9d12dc74074fc4884091bdfd2b15f0 (diff)
downloadcpython-git-a9885e93eeecf799893dcfed59146f98859031f1.tar.gz
Issue #13461: Fix a crash in the TextIOWrapper.tell method and in the "replace"
error handler on 64-bit platforms. Patch by Yogesh Chaudhari.
Diffstat (limited to 'Python/codecs.c')
-rw-r--r--Python/codecs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 91147a07a3..69498c4b0c 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -521,7 +521,7 @@ PyObject *PyCodec_ReplaceErrors(PyObject *exc)
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;