From: Andrew Dalke Date: Thu, 25 May 2006 18:03:25 +0000 (+0000) Subject: Code had returned an ssize_t, upcast to long, then converted with PyInt_FromLong. X-Git-Tag: v2.5b1~530 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b552c4d848c740d6f46ada84f4f6b683305a3b08;p=python Code had returned an ssize_t, upcast to long, then converted with PyInt_FromLong. Now using PyInt_FromSsize_t. --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index bcf2c38345..aff14f593a 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5306,7 +5306,7 @@ unicode_count(PyUnicodeObject *self, PyObject *args) if (end < 0) end = 0; - result = PyInt_FromLong((long) count(self, start, end, substring)); + result = PyInt_FromSsize_t(count(self, start, end, substring)); Py_DECREF(substring); return result;