Commit ad520a8c authored by Travis Hance's avatar Travis Hance

fixes from kmod's comments

parent c33cda3e
......@@ -66,7 +66,7 @@ calliter_next(calliterobject *it)
Py_CLEAR(it->it_sentinel);
}
}
else if (PyErr_ExceptionMatches(PyExc_StopIteration) || PyErr_ExceptionMatches(PyExc_IndexError)) {
else if (PyErr_ExceptionMatches(PyExc_StopIteration)) {
PyErr_Clear();
Py_CLEAR(it->it_callable);
Py_CLEAR(it->it_sentinel);
......
......@@ -40,7 +40,7 @@ Box* listiterHasnext(Box* s) {
BoxedListIterator* self = static_cast<BoxedListIterator*>(s);
if (!self->l) {
raiseExcHelper(StopIteration, "");
return False;
}
bool ans = (self->pos < self->l->size);
......@@ -55,7 +55,7 @@ i1 listiterHasnextUnboxed(Box* s) {
BoxedListIterator* self = static_cast<BoxedListIterator*>(s);
if (!self->l) {
raiseExcHelper(StopIteration, "");
return false;
}
bool ans = (self->pos < self->l->size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment