[Zope-Checkins] CVS: Zope3/lib/python/Persistence - cPersistence.c:1.10
Jeremy Hylton
jeremy@zope.com
Fri, 12 Jul 2002 08:49:02 -0400
Update of /cvs-repository/Zope3/lib/python/Persistence
In directory cvs.zope.org:/tmp/cvs-serv19986
Modified Files:
cPersistence.c
Log Message:
Add comment explaining state change for unghostification.
=== Zope3/lib/python/Persistence/cPersistence.c 1.9 => 1.10 ===
|| ((strncmp(s_name, "_p_", 3) != 0)
&& (strcmp(s_name, "__dict__") != 0))) {
if (self->po_state == GHOST) {
+ /* Prevent the object from being registered as changed.
+
+ If the object is changed while it is being unghostified,
+ it should not be registered with the data manager as
+ a changed object. The easiest way to prevent this is
+ to mark it as already changed, which implies it is
+ already registered.
+ */
self->po_state = CHANGED;
if (_PyPersist_Load((PyPersistBaseObject *)self) == NULL) {
call_p_deactivate(self);