Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
runtime->main -> runtime->interpreters.main.
  • Loading branch information
ericsnowcurrently committed Sep 12, 2022
commit dba446005c301df7c5482f53de79a298c09acb71
2 changes: 1 addition & 1 deletion Python/ceval_gil.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ int
_PyEval_ThreadsInitialized(PyInterpreterState *interp)
{
if (interp == NULL) {
interp = &_PyRuntime.main;
interp = _PyRuntime.interpreters.main;
if (interp == NULL) {
return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,8 @@ PyGILState_Ensure(void)

/* Ensure that _PyEval_InitThreads() has been called by Py_Initialize() */
// XXX Use the appropriate interpreter.
assert(runtime->main && _PyEval_ThreadsInitialized(runtime->main));
assert(runtime->interpreters.main &&
_PyEval_ThreadsInitialized(runtime->interpreters.main));
/* Ensure that _PyGILState_Init() has been called by Py_Initialize() */
assert(gilstate->autoInterpreterState);

Expand Down