mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
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:
parent
0135598d72
commit
1c4cbdf94d
7 changed files with 152 additions and 125 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue