*** branch-2.1/Modules/gcmodule.c Mon Dec 3 17:22:35 2001 --- software/Python-2.1.2/Modules/gcmodule.c Wed Mar 27 21:01:26 2002 *************** *** 87,98 **** static void gc_list_remove(PyGC_Head *node) { node->gc_prev->gc_next = node->gc_next; node->gc_next->gc_prev = node->gc_prev; #ifdef Py_DEBUG node->gc_prev = NULL; - node->gc_next = NULL; #endif } static void --- 87,100 ---- static void gc_list_remove(PyGC_Head *node) { + if (node->gc_next == NULL) + return; node->gc_prev->gc_next = node->gc_next; node->gc_next->gc_prev = node->gc_prev; #ifdef Py_DEBUG node->gc_prev = NULL; #endif + node->gc_next = NULL; } static void *** branch-2.1/Objects/dictobject.c Fri Oct 19 10:07:31 2001 --- software/Python-2.1.2/Objects/dictobject.c Wed Mar 27 21:03:24 2002 *************** *** 619,626 **** { register int i; register dictentry *ep; - Py_TRASHCAN_SAFE_BEGIN(mp) PyObject_GC_Fini(mp); for (i = 0, ep = mp->ma_table; i < mp->ma_size; i++, ep++) { if (ep->me_key != NULL) { Py_DECREF(ep->me_key); --- 619,626 ---- { register int i; register dictentry *ep; PyObject_GC_Fini(mp); + Py_TRASHCAN_SAFE_BEGIN(mp) for (i = 0, ep = mp->ma_table; i < mp->ma_size; i++, ep++) { if (ep->me_key != NULL) { Py_DECREF(ep->me_key); *** branch-2.1/Objects/listobject.c Fri Oct 19 10:07:31 2001 --- software/Python-2.1.2/Objects/listobject.c Wed Mar 27 21:03:09 2002 *************** *** 176,183 **** list_dealloc(PyListObject *op) { int i; - Py_TRASHCAN_SAFE_BEGIN(op) PyObject_GC_Fini(op); if (op->ob_item != NULL) { /* Do it backwards, for Christian Tismer. There's a simple test case where somehow this reduces --- 176,183 ---- list_dealloc(PyListObject *op) { int i; PyObject_GC_Fini(op); + Py_TRASHCAN_SAFE_BEGIN(op) if (op->ob_item != NULL) { /* Do it backwards, for Christian Tismer. There's a simple test case where somehow this reduces *** branch-2.1/Objects/tupleobject.c Fri Oct 19 10:07:31 2001 --- software/Python-2.1.2/Objects/tupleobject.c Wed Mar 27 14:58:49 2002 *************** *** 143,150 **** { register int i; register int len = op->ob_size; - Py_TRASHCAN_SAFE_BEGIN(op) PyObject_GC_Fini(op); if (len > 0) { i = len; while (--i >= 0) --- 143,150 ---- { register int i; register int len = op->ob_size; PyObject_GC_Fini(op); + Py_TRASHCAN_SAFE_BEGIN(op) if (len > 0) { i = len; while (--i >= 0)