diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pylifecycle.c | 2 | ||||
-rw-r--r-- | Python/pystate.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 1bc7d77..c2a0781 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1553,7 +1553,7 @@ new_interpreter(PyThreadState **tstate_p) /* Issue #10915, #15751: The GIL API doesn't work with multiple interpreters: disable PyGILState_Check(). */ - _PyGILState_check_enabled = 0; + runtime->gilstate.check_enabled = 0; PyInterpreterState *interp = PyInterpreterState_New(); if (interp == NULL) { diff --git a/Python/pystate.c b/Python/pystate.c index 19beaf0..3636dc9 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1329,12 +1329,11 @@ PyGILState_GetThisThreadState(void) int PyGILState_Check(void) { - - if (!_PyGILState_check_enabled) { + struct _gilstate_runtime_state *gilstate = &_PyRuntime.gilstate; + if (!gilstate->check_enabled) { return 1; } - struct _gilstate_runtime_state *gilstate = &_PyRuntime.gilstate; if (!PyThread_tss_is_created(&gilstate->autoTSSkey)) { return 1; } |