mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Inline PyIter_Next() matching what was done for other itertools.
This commit is contained in:
parent
2a75e8f958
commit
b5244a3fe5
1 changed files with 2 additions and 2 deletions
|
@ -1860,7 +1860,7 @@ chain_next(chainobject *lz)
|
||||||
return NULL; /* input not iterable */
|
return NULL; /* input not iterable */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
item = PyIter_Next(lz->active);
|
item = (*Py_TYPE(lz->active)->tp_iternext)(lz->active);
|
||||||
if (item != NULL)
|
if (item != NULL)
|
||||||
return item;
|
return item;
|
||||||
if (PyErr_Occurred()) {
|
if (PyErr_Occurred()) {
|
||||||
|
@ -3434,7 +3434,7 @@ accumulate_next(accumulateobject *lz)
|
||||||
{
|
{
|
||||||
PyObject *val, *oldtotal, *newtotal;
|
PyObject *val, *oldtotal, *newtotal;
|
||||||
|
|
||||||
val = PyIter_Next(lz->it);
|
val = (*Py_TYPE(lz->it)->tp_iternext)(lz->it);
|
||||||
if (val == NULL)
|
if (val == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue