Skip to content
Closed
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
Next Next commit
More optimization
  • Loading branch information
corona10 committed Jun 15, 2024
commit fd95922203452223b5f76b58dad40b541abcb7f7
3 changes: 2 additions & 1 deletion Objects/rangeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,8 @@ static PyObject *
rangeiter_next(_PyRangeIterObject *r)
{
#ifdef Py_GIL_DISABLED
int64_t step = _Py_atomic_load_int64_relaxed(&r->step);
// r->step is readonly attribute, so we can assume it is not changed.
int64_t step = (int64_t)r->step;
do {
int64_t len = _Py_atomic_load_int64_relaxed(&r->len);
if (len <= 0) {
Expand Down