[Zope3-checkins] CVS: Zope3/src/persistence - persistence.c:1.3

Jeremy Hylton jeremy@zope.com
Tue, 31 Dec 2002 16:12:34 -0500


Update of /cvs-repository/Zope3/src/persistence
In directory cvs.zope.org:/tmp/cvs-serv13837

Modified Files:
	persistence.c 
Log Message:
_p_activate() should set the state to UPTODATE after it runs.


=== Zope3/src/persistence/persistence.c 1.2 => 1.3 ===
--- Zope3/src/persistence/persistence.c:1.2	Wed Dec 25 09:12:13 2002
+++ Zope3/src/persistence/persistence.c	Tue Dec 31 16:12:34 2002
@@ -206,9 +206,11 @@
 static PyObject *
 persist_activate(PyPersistObject *self)
 {
-    if (self->po_state == GHOST && self->po_dm
-	&& !_PyPersist_Load((PyPersistObject *)self))
-	return NULL;
+    if (self->po_state == GHOST && self->po_dm) {
+	if (!_PyPersist_Load((PyPersistObject *)self))
+	    return NULL;
+	self->po_state = UPTODATE;
+    }
     Py_INCREF(Py_None);
     return Py_None;
 }