[Python-checkins] r60639 - python/trunk/Objects/tupleobject.c
raymond.hettinger
python-checkins at python.org
Thu Feb 7 03:12:52 CET 2008
Author: raymond.hettinger
Date: Thu Feb 7 03:12:52 2008
New Revision: 60639
Modified:
python/trunk/Objects/tupleobject.c
Log:
Return ints instead of longs for tuple.count() and tuple.index().
Modified: python/trunk/Objects/tupleobject.c
==============================================================================
--- python/trunk/Objects/tupleobject.c (original)
+++ python/trunk/Objects/tupleobject.c Thu Feb 7 03:12:52 2008
@@ -478,7 +478,7 @@
for (i = start; i < stop && i < Py_SIZE(self); i++) {
int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
if (cmp > 0)
- return PyLong_FromSsize_t(i);
+ return PyInt_FromSsize_t(i);
else if (cmp < 0)
return NULL;
}
@@ -499,7 +499,7 @@
else if (cmp < 0)
return NULL;
}
- return PyLong_FromSsize_t(count);
+ return PyInt_FromSsize_t(count);
}
static int
More information about the Python-checkins
mailing list