Skip to content

Commit c6a7f91

Browse files
add back assertion
1 parent 7115c75 commit c6a7f91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Include/internal/pycore_freelist.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ extern "C" {
1717
static inline struct _Py_freelists *
1818
_Py_freelists_GET(void)
1919
{
20+
#ifdef Py_DEBUG
21+
PyThreadState *tstate = _PyThreadState_GET();
22+
_Py_EnsureTstateNotNULL(tstate);
23+
#endif
24+
2025
#ifdef Py_GIL_DISABLED
2126
PyThreadState *tstate = _PyThreadState_GET();
2227
return &((_PyThreadStateImpl*)tstate)->freelists;

0 commit comments

Comments
 (0)