summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c5
1 files changed, 2 insertions, 3 deletions
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;
}