Skip to content

Commit

Permalink
Dummy commit to use the macros on the build bots
Browse files Browse the repository at this point in the history
  • Loading branch information
mpage committed Feb 13, 2024
1 parent e78e018 commit bfe4934
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "pycore_long.h" // _PyLong_DigitCount
#include "pycore_modsupport.h" // _PyArg_NoKwnames()
#include "pycore_object.h" // _PyObject_GC_TRACK(), _PyDebugAllocatorStats()
#include "pycore_pyatomic_ft_wrappers.h"
#include "pycore_tuple.h" // _PyTuple_FromArray()
#include <stddef.h>

Expand Down Expand Up @@ -3399,7 +3400,7 @@ listiter_len(PyObject *self, PyObject *Py_UNUSED(ignored))
_PyListIterObject *it = (_PyListIterObject *)self;
Py_ssize_t len;
if (it->it_seq) {
len = PyList_GET_SIZE(it->it_seq) - it->it_index;
len = PyList_GET_SIZE(it->it_seq) - FT_ATOMIC_LOAD_SSIZE_RELAXED(it->it_index);
if (len >= 0)
return PyLong_FromSsize_t(len);
}
Expand All @@ -3424,7 +3425,7 @@ listiter_setstate(PyObject *self, PyObject *state)
index = 0;
else if (index > PyList_GET_SIZE(it->it_seq))
index = PyList_GET_SIZE(it->it_seq); /* iterator exhausted */
it->it_index = index;
FT_ATOMIC_STORE_SSIZE_RELAXED(it->it_index, index);
}
Py_RETURN_NONE;
}
Expand Down

0 comments on commit bfe4934

Please sign in to comment.