[Python-checkins] r46231 - python/trunk/Objects/unicodeobject.c

andrew.dalke python-checkins at python.org
Thu May 25 20:03:26 CEST 2006


Author: andrew.dalke
Date: Thu May 25 20:03:25 2006
New Revision: 46231

Modified:
   python/trunk/Objects/unicodeobject.c
Log:
Code had returned an ssize_t, upcast to long, then converted with PyInt_FromLong.
Now using PyInt_FromSsize_t.



Modified: python/trunk/Objects/unicodeobject.c
==============================================================================
--- python/trunk/Objects/unicodeobject.c	(original)
+++ python/trunk/Objects/unicodeobject.c	Thu May 25 20:03:25 2006
@@ -5306,7 +5306,7 @@
     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;


More information about the Python-checkins mailing list