-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Milestone
Description
Should we be using __Pyx_PyList_GetItemRef below?
cython/Cython/Utility/Optimize.c
Lines 456 to 460 in ee3819c
| *ppos = pos + 1; | |
| #if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS | |
| next_item = PyList_GetItemRef(iter_obj, pos); | |
| if (unlikely(!next_item)) return -1; | |
| #elif CYTHON_ASSUME_SAFE_MACROS |
My reasoning is that CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS is defined to 1 for both PyPy and GraalPy by default, so we run into this even though we are not on 3.13, yet (where PyList_GetItemRef was added).