Commit df76cb79 authored by Jim Fulton's avatar Jim Fulton

Fixed bug in range queries.

parent 2a1b35cc
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
static char BTree_module_documentation[] = static char BTree_module_documentation[] =
"" ""
"\n$Id: BTree.c,v 1.5 1997/10/01 02:47:06 jim Exp $" "\n$Id: BTree.c,v 1.6 1997/10/10 18:21:45 jim Exp $"
; ;
#define PERSISTENT #define PERSISTENT
...@@ -394,6 +394,7 @@ bucket_index(Bucket *self, PyObject *key, int less) ...@@ -394,6 +394,7 @@ bucket_index(Bucket *self, PyObject *key, int less)
PER_ALLOW_DEACTIVATION(self); PER_ALLOW_DEACTIVATION(self);
if(less) return max-1; if(less) return max-1;
if(max==min) return min;
return min+1; return min+1;
} }
...@@ -1713,7 +1714,7 @@ initBTree() ...@@ -1713,7 +1714,7 @@ initBTree()
#endif #endif
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.5 $"; char *rev="$Revision: 1.6 $";
UNLESS(PyExtensionClassCAPI=PyCObject_Import("ExtensionClass","CAPI")) UNLESS(PyExtensionClassCAPI=PyCObject_Import("ExtensionClass","CAPI"))
return; return;
...@@ -1773,6 +1774,9 @@ initBTree() ...@@ -1773,6 +1774,9 @@ initBTree()
Revision Log: Revision Log:
$Log: BTree.c,v $ $Log: BTree.c,v $
Revision 1.6 1997/10/10 18:21:45 jim
Fixed bug in range queries.
Revision 1.5 1997/10/01 02:47:06 jim Revision 1.5 1997/10/01 02:47:06 jim
Fixed bug in setstate that allocates too much memory. Fixed bug in setstate that allocates too much memory.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment