mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
gh-125286: Share the Main Refchain With Legacy Interpreters (gh-125709)
They used to be shared, before 3.12. Returning to sharing them resolves a failure on Py_TRACE_REFS builds. Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
de0d5c6e2e
commit
6f26d496d3
7 changed files with 99 additions and 61 deletions
|
@ -629,10 +629,8 @@ init_interpreter(PyInterpreterState *interp,
|
|||
assert(next != NULL || (interp == runtime->interpreters.main));
|
||||
interp->next = next;
|
||||
|
||||
PyStatus status = _PyObject_InitState(interp);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
// We would call _PyObject_InitState() at this point
|
||||
// if interp->feature_flags were alredy set.
|
||||
|
||||
_PyEval_InitState(interp);
|
||||
_PyGC_InitState(&interp->gc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue