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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user