Skip to content

Commit 9db5a2b

Browse files
Set interp-_ready on the main interpreter.
1 parent 175080c commit 9db5a2b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎Python/pylifecycle.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ pyinit_core_reconfigure(_PyRuntimeState *runtime,
477477
if (interp == NULL) {
478478
return _PyStatus_ERR("can't make main interpreter");
479479
}
480+
assert(interp->_ready);
480481

481482
status = _PyConfig_Write(config, runtime);
482483
if (_PyStatus_EXCEPTION(status)) {
@@ -632,6 +633,7 @@ pycore_create_interpreter(_PyRuntimeState *runtime,
632633
assert(interp != NULL);
633634
assert(_Py_IsMainInterpreter(interp));
634635
_PyInterpreterState_SetWhence(interp, _PyInterpreterState_WHENCE_RUNTIME);
636+
interp->_ready = 1;
635637

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

0 commit comments

Comments
 (0)