mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter (gh-104072)
Until now, we haven't been initializing nor finalizing the per-interpreter state properly.
This commit is contained in:
parent
b1ca34d4d5
commit
fdd878650d
17 changed files with 146 additions and 135 deletions
|
|
@ -272,8 +272,9 @@ _PyObject_GET_WEAKREFS_LISTPTR(PyObject *op)
|
|||
{
|
||||
if (PyType_Check(op) &&
|
||||
((PyTypeObject *)op)->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN) {
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
static_builtin_state *state = _PyStaticType_GetState(
|
||||
(PyTypeObject *)op);
|
||||
interp, (PyTypeObject *)op);
|
||||
return _PyStaticType_GET_WEAKREFS_LISTPTR(state);
|
||||
}
|
||||
// Essentially _PyObject_GET_WEAKREFS_LISTPTR_FROM_OFFSET():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue