diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-13 11:45:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 11:45:21 +0200 |
commit | 1c4cbdf94dbb4a6ac1093d2fa7a75efa802b25bc (patch) | |
tree | e83ac1dbc56e942701d0ac73ce722a90ddedfa22 /Python/pystate.c | |
parent | 0135598d729d01f35ce08d47160adaa095a6149f (diff) | |
download | cpython-git-1c4cbdf94dbb4a6ac1093d2fa7a75efa802b25bc.tar.gz |
bpo-40268: Add pycore_runtime.h header file (GH-19493)
Move PyRuntimeState from pycore_pystate.h to pycore_runtime.h.
Remove _PyGILState_check_enabled macro: access directly
_PyRuntime.gilstate.check_enabled.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 19beaf05eb..3636dc9c04 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; } |