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

Tim Peters tim.one@comcast.net
Wed, 5 Jun 2002 21:15:53 -0400


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

Modified Files:
      Tag: Zope-3x-branch
	BTreeTemplate.c 
Log Message:
Trimmed trailing whitespace.


=== Zope3/lib/python/Persistence/BTrees/BTreeTemplate.c 1.1.2.15 => 1.1.2.16 === (749/849 lines abridged)
   Copyright (c) 2001, 2002 Zope Corporation and Contributors.
   All Rights Reserved.
-  
+
   This software is subject to the provisions of the Zope Public License,
   Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
   THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
   WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
   FOR A PARTICULAR PURPOSE
-  
+
  ****************************************************************************/
 
 #define BTREETEMPLATE_C "$Id$\n"
@@ -40,7 +40,7 @@
   int min;              /* index of child to search */
   PyObject *r = NULL;   /* result object */
   int copied = 1;
-  
+
   COPY_KEY_FROM_ARG(key, keyarg, copied);
   UNLESS (copied) return NULL;
 
@@ -51,16 +51,16 @@
   BTREE_SEARCH(min, self, key, goto Error);
   if (self->len)
     {
-      if (SameType_Check(self, self->data[min].child)) 
-        r=_BTree_get( BTREE(self->data[min].child), keyarg, 
+      if (SameType_Check(self, self->data[min].child))
+        r=_BTree_get( BTREE(self->data[min].child), keyarg,
                       has_key ? has_key + 1: 0);
       else
-        r=_bucket_get(BUCKET(self->data[min].child), keyarg, 
+        r=_bucket_get(BUCKET(self->data[min].child), keyarg,
                       has_key ? has_key + 1: 0);
     }
   else
     {  /* No data */
-      UNLESS (has_key) 
+      UNLESS (has_key)
         {
           PyErr_SetObject(PyExc_KeyError, keyarg);
           r=NULL;
@@ -73,7 +73,7 @@
   PyPersist_DECREF(self);
   PyPersist_SetATime(self);
   return r;
-}    

[-=- -=- -=- 749 lines omitted -=- -=- -=-]

    "insert(key, value) -> 0 or 1\n\n"
    "Add an item if the key is not already used. Return 1 if the item was\n"
@@ -1270,7 +1270,7 @@
 {
     int err = 0;
     int i, len;
-    
+
     /* XXX doesn't this routine need to unghostify? */
 
 #define VISIT(SLOT)                             \
@@ -1288,7 +1288,7 @@
     if (KEY_IF_OBJECT(self) != NULL) {
         /* Keys are Python objects so need to be traversed.  Note that the
          * key 0 slot is unused and should not be traversed.
-         */ 
+         */
         for (i = 1 ; i < len; i++)
 	    VISIT(self->data[i].key);
     }
@@ -1323,16 +1323,16 @@
 {
   int c=0;
   Bucket *b, *n;
-  
-  PER_USE_OR_RETURN(self, -1); 
+
+  PER_USE_OR_RETURN(self, -1);
   b = self->firstbucket;
   Py_XINCREF(b);
   PyPersist_DECREF(self);
   PyPersist_SetATime(self);
 
-  while (b != NULL) 
+  while (b != NULL)
     {
-      PER_USE_OR_RETURN(b, -1); 
+      PER_USE_OR_RETURN(b, -1);
       c += b->len;
       if (nonzero && c)
         {
@@ -1395,7 +1395,7 @@
     0,					/* tp_getattro */
     0,					/* tp_setattro */
     0,					/* tp_as_buffer */
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | 
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
 	    Py_TPFLAGS_BASETYPE, 	/* tp_flags */
     0,					/* tp_doc */
     (traverseproc)BTree_traverse,	/* tp_traverse */