From 18e165558b24d29e7e0ca501842b9236589b012a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 15 Feb 2006 17:27:45 +0000 Subject: Merge ssize_t branch. --- Python/codecs.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Python/codecs.c') diff --git a/Python/codecs.c b/Python/codecs.c index 5c521fb0b4..2fcd6c55f5 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -460,7 +460,7 @@ PyObject *PyCodec_StrictErrors(PyObject *exc) #ifdef Py_USING_UNICODE PyObject *PyCodec_IgnoreErrors(PyObject *exc) { - int end; + Py_ssize_t end; if (PyObject_IsInstance(exc, PyExc_UnicodeEncodeError)) { if (PyUnicodeEncodeError_GetEnd(exc, &end)) return NULL; @@ -478,16 +478,16 @@ PyObject *PyCodec_IgnoreErrors(PyObject *exc) return NULL; } /* ouch: passing NULL, 0, pos gives None instead of u'' */ - return Py_BuildValue("(u#i)", &end, 0, end); + return Py_BuildValue("(u#n)", &end, 0, end); } PyObject *PyCodec_ReplaceErrors(PyObject *exc) { PyObject *restuple; - int start; - int end; - int i; + Py_ssize_t start; + Py_ssize_t end; + Py_ssize_t i; if (PyObject_IsInstance(exc, PyExc_UnicodeEncodeError)) { PyObject *res; @@ -502,7 +502,7 @@ PyObject *PyCodec_ReplaceErrors(PyObject *exc) for (p = PyUnicode_AS_UNICODE(res), i = start; i