File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -3929,7 +3929,7 @@ listiter_dealloc(PyObject *self)
39293929 _PyListIterObject * it = (_PyListIterObject * )self ;
39303930 _PyObject_GC_UNTRACK (it );
39313931 Py_XDECREF (it -> it_seq );
3932- assert (Py_TYPE (self ) == _PyListIterObject );
3932+ assert (Py_IS_TYPE (self , & PyListIter_Type ) );
39333933 _Py_FREELIST_FREE (list_iters , it , PyObject_GC_Del );
39343934}
39353935
Original file line number Diff line number Diff line change @@ -996,6 +996,7 @@ tupleiter_dealloc(PyObject *self)
996996 _PyTupleIterObject * it = _PyTupleIterObject_CAST (self );
997997 _PyObject_GC_UNTRACK (it );
998998 Py_XDECREF (it -> it_seq );
999+ assert (Py_IS_TYPE (self , & PyTupleIter_Type ));
9991000 _Py_FREELIST_FREE (tuple_iters , it , PyObject_GC_Del );
10001001}
10011002
You can’t perform that action at this time.
0 commit comments