[Python-checkins]
python/dist/src/Objects weakrefobject.c, 1.13.6.4, 1.13.6.5
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Sun Oct 31 02:13:34 CEST 2004
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2582/Objects
Modified Files:
Tag: release23-maint
weakrefobject.c
Log Message:
SF 1055820: weakref callback vs gc vs threads
In cyclic gc, clear all weakrefs to unreachable objects before allowing any
Python code (weakref callbacks or __del__ methods) to run.
This is a critical bugfix, affecting all versions of Python since weakrefs
were introduced.
Index: weakrefobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/weakrefobject.c,v
retrieving revision 1.13.6.4
retrieving revision 1.13.6.5
diff -u -d -r1.13.6.4 -r1.13.6.5
--- weakrefobject.c 3 Aug 2004 14:46:57 -0000 1.13.6.4
+++ weakrefobject.c 31 Oct 2004 00:13:07 -0000 1.13.6.5
@@ -742,7 +742,9 @@
return PyWeakref_GET_OBJECT(ref);
}
-
+/* Note that there's an inlined copy-paste of handle_callback() in gcmodule.c's
+ * handle_weakrefs().
+ */
static void
handle_callback(PyWeakReference *ref, PyObject *callback)
{
More information about the Python-checkins
mailing list