X Tutup
Skip to content

Commit 2f4bbdf

Browse files
author
raymond.hettinger
committed
Return ints instead of longs for tuple.count() and tuple.index().
git-svn-id: http://svn.python.org/projects/python/trunk@60639 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent c589b83 commit 2f4bbdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/tupleobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ tupleindex(PyTupleObject *self, PyObject *args)
478478
for (i = start; i < stop && i < Py_SIZE(self); i++) {
479479
int cmp = PyObject_RichCompareBool(self->ob_item[i], v, Py_EQ);
480480
if (cmp > 0)
481-
return PyLong_FromSsize_t(i);
481+
return PyInt_FromSsize_t(i);
482482
else if (cmp < 0)
483483
return NULL;
484484
}
@@ -499,7 +499,7 @@ tuplecount(PyTupleObject *self, PyObject *v)
499499
else if (cmp < 0)
500500
return NULL;
501501
}
502-
return PyLong_FromSsize_t(count);
502+
return PyInt_FromSsize_t(count);
503503
}
504504

505505
static int

0 commit comments

Comments
 (0)
X Tutup