diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-08-16 13:15:00 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-08-16 13:15:00 (GMT) |
commit | e3eb1f2b2320bceb10a763ec8691200b85ec287a (patch) | |
tree | df47f81391869945dc661a08c405b53753fba887 /Objects/iterobject.c | |
parent | c35422109b36d20f409a3a72f60c0c7e2e0bc824 (diff) | |
download | cpython-e3eb1f2b2320bceb10a763ec8691200b85ec287a.zip cpython-e3eb1f2b2320bceb10a763ec8691200b85ec287a.tar.gz cpython-e3eb1f2b2320bceb10a763ec8691200b85ec287a.tar.bz2 |
Patch #427190: Implement and use METH_NOARGS and METH_O.
Diffstat (limited to 'Objects/iterobject.c')
-rw-r--r-- | Objects/iterobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ iter_traverse(seqiterobject *it, visitproc visit, void *arg) } 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 @@ iter_iternext(PyObject *iterator) } 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 */ }; |