[Zodb-checkins] CVS: ZODB3/ZODB - coptimizations.c:1.22

Jeremy Hylton jeremy@zope.com
Thu, 12 Dec 2002 14:02:08 -0500


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv22016

Modified Files:
	coptimizations.c 
Log Message:
Add comment explaining contract of persistent_id_call().


=== ZODB3/ZODB/coptimizations.c 1.21 => 1.22 ===
--- ZODB3/ZODB/coptimizations.c:1.21	Thu Dec 12 13:52:21 2002
+++ ZODB3/ZODB/coptimizations.c	Thu Dec 12 14:02:07 2002
@@ -153,6 +153,22 @@
     return NULL;
 }
 
+/* persistent_id_call()
+
+   Returns a reference to a persistent object, appending it to the the
+   persistent_id's list of objects.  If a non-persistent object is
+   found, return None.
+
+   The returned reference can be either class info, oid pair or a
+   plain old oid.  If it is a pair, the class info is the module and
+   the name of the class.  The class info can be used to create a
+   ghost without loading the class.
+
+   For unusual objects, e.g. ZClasses, return just the oid.  An object
+   is unusual if it isn't an ExtensionClass, because that means it
+   doesn't inherit from Persistence, or if it has __getinitargs__().
+*/
+
 static PyObject *
 persistent_id_call(persistent_id *self, PyObject *args, PyObject *kwargs)
 {