]> granicus.if.org Git - python/commitdiff
Code had returned an ssize_t, upcast to long, then converted with PyInt_FromLong.
authorAndrew Dalke <dalke@dalkescientific.com>
Thu, 25 May 2006 18:03:25 +0000 (18:03 +0000)
committerAndrew Dalke <dalke@dalkescientific.com>
Thu, 25 May 2006 18:03:25 +0000 (18:03 +0000)
Now using PyInt_FromSsize_t.

Objects/unicodeobject.c

index bcf2c38345b35d2452981e865ed5d60aa0dd0c13..aff14f593aa12f033a2ab7c7c34c844393ede6f7 100644 (file)
@@ -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;