0, /*tp_as_mapping*/
(hashfunc)float_hash, /*tp_hash*/
};
+
+void
+PyFloat_Fini()
+{
+ /* XXX Alas, the free list is not easily and safely freeable */
+}
0, /*tp_as_mapping*/
(hashfunc)int_hash, /*tp_hash*/
};
+
+void
+PyInt_Fini()
+{
+#if NSMALLNEGINTS + NSMALLPOSINTS > 0
+ int i;
+ PyIntObject **p;
+
+ i = NSMALLNEGINTS + NSMALLPOSINTS;
+ p = small_ints;
+ while (--i >= 0) {
+ Py_XDECREF(*p);
+ *p++ = NULL;
+ }
+#endif
+ /* XXX Alas, the free list is not easily and safely freeable */
+}
#ifdef COUNT_ALLOCS
fast_tuple_allocs++;
#endif
- } else
+ }
+ else
#endif
{
op = (PyTupleObject *) malloc(
sv->ob_size = newsize;
return 0;
}
+
+void
+PyTuple_Fini()
+{
+#if MAXSAVESIZE > 0
+ int i;
+
+ Py_XDECREF(free_tuples[0]);
+ free_tuples[0] = NULL;
+
+ for (i = 1; i < MAXSAVESIZE; i++) {
+ PyTupleObject *p, *q;
+ p = free_tuples[i];
+ free_tuples[i] = NULL;
+ while (p) {
+ q = p;
+ p = (PyTupleObject *)(p->ob_item[0]);
+ PyMem_DEL(q);
+ }
+ }
+#endif
+}