[Zope-Checkins] CVS: Zope3/lib/python/Persistence/BTrees - BTreeTemplate.c:1.20 Maintainer.txt:1.5

Tim Peters tim.one@comcast.net
Sat, 15 Jun 2002 00:19:18 -0400


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

Modified Files:
	BTreeTemplate.c Maintainer.txt 
Log Message:
Inconsequential cleanups.


=== Zope3/lib/python/Persistence/BTrees/BTreeTemplate.c 1.19 => 1.20 ===
             changed = 1;
 
-            /* The caller has to do the unlinking -- we can'r.  Also, since
+            /* The caller has to do the unlinking -- we can't.  Also, since
              * it was our firstbucket, it may also be theirs.
              */
             assert(status == 2);
@@ -507,7 +507,7 @@
     if (!SameType_Check(self, d->child)) {
         /* We're about to delete a bucket. */
         if (min) {
-            /* it's not our first bucket, so we can tell the previous
+            /* It's not our first bucket, so we can tell the previous
              * bucket to adjust its reference to it.  It can't be anyone
              * else's first bucket either, so the caller needn't do anything.
              */
@@ -530,7 +530,7 @@
             Py_DECREF(self->firstbucket);
             self->firstbucket = nextbucket;
 
-            status = 2; /* we're giving our caller a firstbucket problem */
+            status = 2; /* we're giving our caller a new firstbucket problem */
          }
     }
 
@@ -549,7 +549,7 @@
     if (changed
 	|| (bchanged                   /* our kid was a bucket & it mutated */
 	    && self->len == 1          /* and we have only one child */
-            && BUCKET(d->child)->po_oid == NULL /* and it's in our record */
+            && self->data[0].child->po_oid == NULL /* and it's in our record */
 	   )
 	) {
         if (PyPersist_CHANGED(self) < 0) goto Error;


=== Zope3/lib/python/Persistence/BTrees/Maintainer.txt 1.4 => 1.5 ===
 
 + In a non-empty BTree, every bucket node contains at least one key,
-  and every BTree node contains at least one child.  An empty BTree
-  consists solely of a BTree node with len==0 and firstbucket==NULL.
+  and every BTree node contains at least one child and a non-NULL
+  firstbucket pointer.  However, a BTree node may not contain any keys.
+
++ An empty BTree consists solely of a BTree node with len==0 and
+  firstbucket==NULL.
 
 + Although a BTree can become unbalanced under a mix of inserts and
   deletes (meaning both that there's nothing stronger that can be