mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-108362: Incremental GC implementation (GH-108038)
This commit is contained in:
parent
b4ba0f73d6
commit
36518e69d7
13 changed files with 701 additions and 446 deletions
|
@ -603,6 +603,9 @@ _PyStructSequence_InitBuiltinWithFlags(PyInterpreterState *interp,
|
|||
PyStructSequence_Desc *desc,
|
||||
unsigned long tp_flags)
|
||||
{
|
||||
if (Py_TYPE(type) == NULL) {
|
||||
Py_SET_TYPE(type, &PyType_Type);
|
||||
}
|
||||
Py_ssize_t n_unnamed_members;
|
||||
Py_ssize_t n_members = count_members(desc, &n_unnamed_members);
|
||||
PyMemberDef *members = NULL;
|
||||
|
@ -618,7 +621,7 @@ _PyStructSequence_InitBuiltinWithFlags(PyInterpreterState *interp,
|
|||
}
|
||||
initialize_static_fields(type, desc, members, tp_flags);
|
||||
|
||||
_Py_SetImmortal(type);
|
||||
_Py_SetImmortal((PyObject *)type);
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue