[Zope-Checkins] CVS: Zope3/lib/python/Persistence - cPersistence.c:1.4
Jeremy Hylton
jeremy@zope.com
Mon, 24 Jun 2002 14:08:44 -0400
Update of /cvs-repository/Zope3/lib/python/Persistence
In directory cvs.zope.org:/tmp/cvs-serv13334
Modified Files:
cPersistence.c
Log Message:
Rename _p_deactivate() to call_p_deactivate().
=== Zope3/lib/python/Persistence/cPersistence.c 1.3 => 1.4 ===
for an atime slot and its particular semantics are specific to the
current cache implementation.
+
+ XXX The calls to time() are very expensive.
*/
void
@@ -380,7 +382,7 @@
}
static int
-_p_deactivate(PyPersistObject *self)
+call_p_deactivate(PyPersistObject *self)
{
static PyObject *t = NULL;
PyObject *func, *r;
@@ -458,17 +460,17 @@
self->po_state = UPTODATE;
} else if (newstate == CHANGED_DELETE) {
/* Force the object to UPTODATE state to guarantee that
- _p_deactivate() will turn it into a ghost.
+ call_p_deactivate() will turn it into a ghost.
*/
self->po_state = UPTODATE;
- if (!_p_deactivate(self))
+ if (!call_p_deactivate(self))
return -1;
} else if (self->po_state == UPTODATE) {
/* The final case is for CHANGED_NONE, which is only
meaningful when the object is already in the up-to-date state.
In this case, turn the object into a ghost.
*/
- if (!_p_deactivate(self))
+ if (!call_p_deactivate(self))
return -1;
}
@@ -558,7 +560,7 @@
if (self->po_state == GHOST) {
self->po_state = CHANGED;
if (_PyPersist_Load((PyPersistBaseObject *)self) == NULL) {
- _p_deactivate(self);
+ call_p_deactivate(self);
self->po_state = GHOST;
return NULL;
} else