Patch #427190: Implement and use METH_NOARGS and METH_O.
diff --git a/Objects/iterobject.c b/Objects/iterobject.c
index e062c8a..5783d20 100644
--- a/Objects/iterobject.c
+++ b/Objects/iterobject.c
@@ -37,7 +37,7 @@
}
static PyObject *
-iter_next(seqiterobject *it, PyObject *args)
+iter_next(seqiterobject *it)
{
PyObject *seq = it->it_seq;
PyObject *result = PySequence_GetItem(seq, it->it_index++);
@@ -91,7 +91,7 @@
}
static PyMethodDef iter_methods[] = {
- {"next", (PyCFunction)iter_next, METH_VARARGS,
+ {"next", (PyCFunction)iter_next, METH_NOARGS,
"it.next() -- get the next value, or raise StopIteration"},
{NULL, NULL} /* sentinel */
};