File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -4544,18 +4544,24 @@ clear_static_tp_subclasses(PyTypeObject *type)
4544
4544
clear_subclasses (type );
4545
4545
}
4546
4546
4547
+ static void
4548
+ clear_static_type_interp_data (PyTypeObject * type )
4549
+ {
4550
+ Py_CLEAR (type -> tp_dict );
4551
+ Py_CLEAR (type -> tp_bases );
4552
+ Py_CLEAR (type -> tp_mro );
4553
+ clear_static_tp_subclasses (type );
4554
+ }
4555
+
4547
4556
void
4548
4557
_PyStaticType_Dealloc (PyTypeObject * type )
4549
4558
{
4550
4559
assert (!(type -> tp_flags & Py_TPFLAGS_HEAPTYPE ));
4551
4560
4552
4561
type_dealloc_common (type );
4553
4562
4554
- Py_CLEAR (type -> tp_dict );
4555
- Py_CLEAR (type -> tp_bases );
4556
- Py_CLEAR (type -> tp_mro );
4557
4563
Py_CLEAR (type -> tp_cache );
4558
- clear_static_tp_subclasses (type );
4564
+ clear_static_type_interp_data (type );
4559
4565
4560
4566
// PyObject_ClearWeakRefs() raises an exception if Py_REFCNT() != 0
4561
4567
if (Py_REFCNT (type ) == 0 ) {
You can’t perform that action at this time.
0 commit comments