Skip to content

Commit

Permalink
Set interp-_ready on the main interpreter.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsnowcurrently committed Apr 10, 2024
1 parent 175080c commit 9db5a2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/pylifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ pyinit_core_reconfigure(_PyRuntimeState *runtime,
if (interp == NULL) {
return _PyStatus_ERR("can't make main interpreter");
}
assert(interp->_ready);

status = _PyConfig_Write(config, runtime);
if (_PyStatus_EXCEPTION(status)) {
Expand Down Expand Up @@ -632,6 +633,7 @@ pycore_create_interpreter(_PyRuntimeState *runtime,
assert(interp != NULL);
assert(_Py_IsMainInterpreter(interp));
_PyInterpreterState_SetWhence(interp, _PyInterpreterState_WHENCE_RUNTIME);
interp->_ready = 1;

status = _PyConfig_Copy(&interp->config, src_config);
if (_PyStatus_EXCEPTION(status)) {
Expand Down

0 comments on commit 9db5a2b

Please sign in to comment.