[Zope-Checkins] CVS: Zope3/lib/python/Persistence/BTrees - BTreeTemplate.c:1.1.2.13

Tim Peters tim.one@comcast.net
Tue, 4 Jun 2002 19:28:33 -0400


Update of /cvs-repository/Zope3/lib/python/Persistence/BTrees
In directory cvs.zope.org:/tmp/cvs-serv8462

Modified Files:
      Tag: Zope-3x-branch
	BTreeTemplate.c 
Log Message:
Jeremy reports that gcc is fatally afraid of vigorous casting <wink>.


=== Zope3/lib/python/Persistence/BTrees/BTreeTemplate.c 1.1.2.12 => 1.1.2.13 ===
 BTree_lastBucket(BTree *self) 
 {
-    Sized *o;
+    PyObject *o;
 
     if (!(self->data && self->len)) {
 	IndexError(-1); /*XXX*/
 	return NULL;
     }
 
-    o = self->data[self->len - 1].child;
+    o = (PyObject *)self->data[self->len - 1].child;
     Py_INCREF(o);
 
     if (!SameType_Check(self, o)) 
@@ -298,7 +298,7 @@
     PyPersist_INCREF(self);
   if (!PyPersist_IS_STICKY(self))
       return NULL;
-    ASSIGN(OBJECT(o), OBJECT(BTree_lastBucket(self)));
+    ASSIGN(o, OBJECT(BTree_lastBucket(self)));
     PyPersist_DECREF(self);
     PyPersist_SetATime(self);