[Python-checkins] python/dist/src/Objects listobject.c,2.224,2.225

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Thu Oct 7 05:58:11 CEST 2004


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2208/Objects

Modified Files:
	listobject.c 
Log Message:
Finalize the freelist of list objects.

Index: listobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v
retrieving revision 2.224
retrieving revision 2.225
diff -u -d -r2.224 -r2.225
--- listobject.c	26 Sep 2004 19:24:20 -0000	2.224
+++ listobject.c	7 Oct 2004 03:58:07 -0000	2.225
@@ -68,6 +68,19 @@
 static PyListObject *free_lists[MAXFREELISTS];
 static int num_free_lists = 0;
 
+void
+PyList_Fini(void)
+{
+	PyListObject *op;
+
+	while (num_free_lists) {
+		num_free_lists--;
+		op = free_lists[num_free_lists]; 
+		assert(PyList_CheckExact(op));
+		PyObject_GC_Del(op);
+	}
+}
+
 PyObject *
 PyList_New(int size)
 {



More information about the Python-checkins mailing list