Skip to content
Prev Previous commit
Next Next commit
requested changes
  • Loading branch information
tom-pytel committed Feb 18, 2025
commit db66626eeff02b60e642d29d067f0e3a189be337
4 changes: 1 addition & 3 deletions Objects/bytearrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2916,9 +2916,7 @@ bytearrayiter_reduce(PyObject *self, PyObject *Py_UNUSED(ignored))
PyObject *ret = NULL;
Py_ssize_t index = FT_ATOMIC_LOAD_SSIZE_RELAXED(it->it_index);
if (index >= 0) {
if (index <= PyByteArray_GET_SIZE(it->it_seq)) {
ret = Py_BuildValue("N(O)n", iter, it->it_seq, index);
}
ret = Py_BuildValue("N(O)n", iter, it->it_seq, index);
Comment thread
kumaraditya303 marked this conversation as resolved.
Outdated
}
if (ret == NULL) {
ret = Py_BuildValue("N(())", iter);
Expand Down