Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix
  • Loading branch information
eendebakpt committed Mar 14, 2025
commit 65daaeec797f75b812ff289422acfb3425c2d86f
7 changes: 4 additions & 3 deletions Modules/itertoolsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3634,9 +3634,10 @@ repeat_next(PyObject *op)
if (cnt == 0) {
return NULL;
}
cnt--;
assert(cnt >=0);
FT_ATOMIC_STORE_SSIZE_RELAXED(ro->cnt, cnt);
if (cnt > 0) {
cnt--;
FT_ATOMIC_STORE_SSIZE_RELAXED(ro->cnt, cnt);
}
return Py_NewRef(ro->element);
}

Expand Down
Loading