Skip to content

Commit 428d3e0

Browse files
cleanup 1
1 parent 04318d0 commit 428d3e0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Include/internal/pycore_freelist.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ extern "C" {
1717
static inline struct _Py_freelists *
1818
_Py_freelists_GET(void)
1919
{
20+
_Py_AssertHoldsTstate();
2021
#ifdef Py_GIL_DISABLED
2122
PyThreadState *tstate = _PyThreadState_GET();
2223
return &((_PyThreadStateImpl*)tstate)->freelists;

Include/internal/pycore_pystate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static inline PyInterpreterState* _PyInterpreterState_GET(void) {
212212
#if defined(HAVE_THREAD_LOCAL) && !defined(Py_BUILD_CORE_MODULE)
213213
return _Py_tss_interp;
214214
#else
215-
return PyInterpreterState_Get();
215+
return _PyThreadState_GET()->interp;
216216
#endif
217217
}
218218

0 commit comments

Comments
 (0)