diff options
author | Raymond Hettinger <python@rcn.com> | 2015-08-16 21:24:20 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-08-16 21:24:20 (GMT) |
commit | b5244a3fe5aa15c41311fe124f5ba1b209f7c316 (patch) | |
tree | 50e6e60263f11cf12bb93839c9039770606d2a0a /Modules/itertoolsmodule.c | |
parent | 2a75e8f95899431f44a9af9e23ca504d3e73a2ad (diff) | |
download | cpython-b5244a3fe5aa15c41311fe124f5ba1b209f7c316.zip cpython-b5244a3fe5aa15c41311fe124f5ba1b209f7c316.tar.gz cpython-b5244a3fe5aa15c41311fe124f5ba1b209f7c316.tar.bz2 |
Inline PyIter_Next() matching what was done for other itertools.
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r-- | Modules/itertoolsmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 18d55d8..bba0935 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; |