summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 2851247..601d8ae 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -2433,8 +2433,7 @@ sys__is_gil_enabled_impl(PyObject *module)
/*[clinic end generated code: output=57732cf53f5b9120 input=7e9c47f15a00e809]*/
{
#ifdef Py_GIL_DISABLED
- PyInterpreterState *interp = _PyInterpreterState_GET();
- return interp->ceval.gil->enabled;
+ return _PyEval_IsGILEnabled(_PyThreadState_GET());
#else
return 1;
#endif