[Zodb-checkins] CVS: StandaloneZODB/ZODB - cPersistence.c:1.56

Jeremy Hylton jeremy@zope.com
Tue, 2 Apr 2002 17:29:38 -0500


Update of /cvs-repository/StandaloneZODB/ZODB
In directory cvs.zope.org:/tmp/cvs-serv23221

Modified Files:
	cPersistence.c 
Log Message:
Don't use the HOME() macro in unghostify().  Get a pointer to the
ring_home and use it explicitly.

Remove now unused KEEP_THIS_ONE_AROUND_FOR_A_WHILE() macro.


=== StandaloneZODB/ZODB/cPersistence.c 1.55 => 1.56 ===
         /* XXX Is it ever possibly to not have a cache? */
         if (self->cache) {
+	    CPersistentRing *home = &self->cache->ring_home;
             /* Create a node in the ring for this unghostified object. */
             self->cache->non_ghost_count++;
-            self->ring.next = &self->cache->ring_home;
-            self->ring.prev = (&(self)->cache->ring_home)->prev;
-            HOME(self)->prev->next = &self->ring;
-            HOME(self)->prev = &self->ring;
+            self->ring.next = home;
+            self->ring.prev = home->prev;
+	    home->prev->next = &self->ring;
+	    home->prev = &self->ring;
             Py_INCREF(self);
         }
         self->state = cPersistent_CHANGED_STATE;
@@ -149,9 +150,6 @@
     }
     return 1;
 }
-
-
-#define KEEP_THIS_ONE_AROUND_FOR_A_WHILE(self) accessed(self)
 
 /****************************************************************************/