summaryrefslogtreecommitdiffstats
path: root/Objects/rangeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r--Objects/rangeobject.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 9c7b74e..5dbbf13 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -246,13 +246,6 @@ range_iter(PyObject *seq)
}
static PyObject *
-rangeiter_getiter(PyObject *it)
-{
- Py_INCREF(it);
- return it;
-}
-
-static PyObject *
rangeiter_next(rangeiterobject *r)
{
if (r->index < r->len)
@@ -288,7 +281,7 @@ static PyTypeObject Pyrangeiter_Type = {
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)rangeiter_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)rangeiter_next, /* tp_iternext */
0, /* tp_methods */
};