From: Raymond Hettinger Date: Sun, 16 Aug 2015 21:24:20 +0000 (-0700) Subject: Inline PyIter_Next() matching what was done for other itertools. X-Git-Tag: v3.6.0a1~1780 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5244a3fe5aa15c41311fe124f5ba1b209f7c316;p=python Inline PyIter_Next() matching what was done for other itertools. --- diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 18d55d8216..bba0935898 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -1860,7 +1860,7 @@ chain_next(chainobject *lz) return NULL; /* input not iterable */ } } - item = PyIter_Next(lz->active); + item = (*Py_TYPE(lz->active)->tp_iternext)(lz->active); if (item != NULL) return item; if (PyErr_Occurred()) { @@ -3434,7 +3434,7 @@ accumulate_next(accumulateobject *lz) { PyObject *val, *oldtotal, *newtotal; - val = PyIter_Next(lz->it); + val = (*Py_TYPE(lz->it)->tp_iternext)(lz->it); if (val == NULL) return NULL;