[Zodb-checkins] CVS: Zope/lib/python/ZODB - cPersistence.c:1.54 cPickleCache.c:1.46

Toby Dickenson tdickenson@geminidataloggers.com
Tue, 2 Apr 2002 06:11:47 -0500


Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv13421

Modified Files:
	cPersistence.c cPickleCache.c 
Log Message:
improved some comments

=== Zope/lib/python/ZODB/cPersistence.c 1.53 => 1.54 ===
 	v = PyObject_CallMethod((PyObject *)self->cache, 
 				"_oid_unreferenced", "O", self->oid);
-	/* XXX What does the comment below mean? */
         if (v == NULL)
-	    PyErr_Clear(); /* and explode later */
+	    PyErr_Clear(); /* I dont think this should ever happen */
 	else
 	    Py_DECREF(v);
     }


=== Zope/lib/python/ZODB/cPickleCache.c 1.45 => 1.46 ===
 }
 
-/* XXX What does this function do? */
-
 static PyObject *
 cc_oid_unreferenced(ccobject *self, PyObject *args)
 {
+    /* This is called by the persistent object deallocation
+    function when the reference count on a persistent
+    object reaches zero. We need to fix up our dictionary;
+    its reference is now dangling because we stole its
+    reference count. Be careful to not release the global
+    interpreter lock until this is complete. */
+
     PyObject *oid, *v;
     if (!PyArg_ParseTuple(args, "O:_oid_unreferenced", &oid)) 
 	return NULL;