mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +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
|
@ -15444,10 +15444,6 @@ _PyUnicode_InternStatic(PyInterpreterState *interp, PyObject **p)
|
|||
assert(*p);
|
||||
}
|
||||
|
||||
#ifdef Py_TRACE_REFS
|
||||
extern void _Py_NormalizeImmortalReference(PyObject *);
|
||||
#endif
|
||||
|
||||
static void
|
||||
immortalize_interned(PyObject *s)
|
||||
{
|
||||
|
@ -15463,10 +15459,6 @@ immortalize_interned(PyObject *s)
|
|||
#endif
|
||||
_PyUnicode_STATE(s).interned = SSTATE_INTERNED_IMMORTAL;
|
||||
_Py_SetImmortal(s);
|
||||
#ifdef Py_TRACE_REFS
|
||||
/* Make sure the ref is associated with the right interpreter. */
|
||||
_Py_NormalizeImmortalReference(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
static /* non-null */ PyObject*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue