Skip to content

Commit 350edea

Browse files
vstinnerencukou
authored andcommitted
[3.12] pythongh-123091: Use _Py_IsImmortalLoose() (python#123511)
Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c and ceval.c.
1 parent 3af7834 commit 350edea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Objects/typeobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ set_tp_bases(PyTypeObject *self, PyObject *bases)
302302
assert(PyTuple_GET_SIZE(bases) == 1);
303303
assert(PyTuple_GET_ITEM(bases, 0) == (PyObject *)self->tp_base);
304304
assert(self->tp_base->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN);
305-
assert(_Py_IsImmortal(self->tp_base));
305+
assert(_Py_IsImmortalLoose(self->tp_base));
306306
}
307307
_Py_SetImmortal(bases);
308308
}
@@ -319,7 +319,7 @@ clear_tp_bases(PyTypeObject *self)
319319
Py_CLEAR(self->tp_bases);
320320
}
321321
else {
322-
assert(_Py_IsImmortal(self->tp_bases));
322+
assert(_Py_IsImmortalLoose(self->tp_bases));
323323
_Py_ClearImmortal(self->tp_bases);
324324
}
325325
}
@@ -368,7 +368,7 @@ clear_tp_mro(PyTypeObject *self)
368368
Py_CLEAR(self->tp_mro);
369369
}
370370
else {
371-
assert(_Py_IsImmortal(self->tp_mro));
371+
assert(_Py_IsImmortalLoose(self->tp_mro));
372372
_Py_ClearImmortal(self->tp_mro);
373373
}
374374
}
@@ -5027,7 +5027,7 @@ void
50275027
_PyStaticType_Dealloc(PyInterpreterState *interp, PyTypeObject *type)
50285028
{
50295029
assert(type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN);
5030-
assert(_Py_IsImmortal((PyObject *)type));
5030+
assert(_Py_IsImmortalLoose((PyObject *)type));
50315031

50325032
type_dealloc_common(type);
50335033

0 commit comments

Comments
 (0)