diff options
author | Raymond Hettinger <python@rcn.com> | 2008-02-07 02:12:52 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-02-07 02:12:52 (GMT) |
commit | 55285ef44c70b84d6f2acdbec4540dfc22ac5d45 (patch) | |
tree | e9c879b2f4e23418334e900b0fcec6cae62cb74d /Objects | |
parent | 00c2e65850cb48e6d17afdd8e9d210b48e0d3ce5 (diff) | |
download | cpython-55285ef44c70b84d6f2acdbec4540dfc22ac5d45.zip cpython-55285ef44c70b84d6f2acdbec4540dfc22ac5d45.tar.gz cpython-55285ef44c70b84d6f2acdbec4540dfc22ac5d45.tar.bz2 |
Return ints instead of longs for tuple.count() and tuple.index().
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/tupleobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 69190d5..dfd2a16 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -478,7 +478,7 @@ tupleindex(PyTupleObject *self, PyObject *args) 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 @@ tuplecount(PyTupleObject *self, PyObject *v) else if (cmp < 0) return NULL; } - return PyLong_FromSsize_t(count); + return PyInt_FromSsize_t(count); } static int |