Commit 0c9696d8 authored by Jim Fulton's avatar Jim Fulton

merged in changed from BoboPOS3 version

parent 9069dc11
......@@ -85,7 +85,7 @@
static char BTree_module_documentation[] =
""
"\n$Id: BTree.c,v 1.19 1999/03/10 00:14:35 klm Exp $"
"\n$Id: BTree.c,v 1.20 1999/05/07 01:41:40 jim Exp $"
;
#define PERSISTENT
......@@ -97,6 +97,7 @@ static char BTree_module_documentation[] =
#define PER_USE_OR_RETURN(self, NULL)
#define PER_ALLOW_DEACTIVATION(self)
#define PER_PREVENT_DEACTIVATION(self)
#define PER_DEL(self)
#endif
......@@ -244,7 +245,7 @@ BTreeItems_item_BTree(char kind, int i, BTree *btree)
if(Bucket_Check(d->value))
{
PER_USE_OR_RETURN(d->value, NULL);
PER_USE_OR_RETURN((Bucket*)(d->value), NULL);
switch(kind)
{
case 'k':
......@@ -941,7 +942,7 @@ BTree_grow(BTree *self, int index)
v=d->value;
UNLESS(e=PyObject_CallObject(OBJECT(v->ob_type), NULL)) return -1;
PER_USE_OR_RETURN(v, -1);
PER_USE_OR_RETURN((Bucket*)v, -1);
if(Bucket_Check(v))
{
......@@ -1684,6 +1685,7 @@ Bucket_dealloc(Bucket *self)
DECREF_VALUE(self->data[i].value);
}
free(self->data);
PER_DEL(self);
PyMem_DEL(self);
}
......@@ -1699,6 +1701,8 @@ BTree_dealloc(BTree *self)
Py_DECREF(self->data[i].value);
}
free(self->data);
PER_DEL(self);
PyMem_DEL(self);
}
......@@ -1836,7 +1840,7 @@ initBTree()
#endif
{
PyObject *m, *d;
char *rev="$Revision: 1.19 $";
char *rev="$Revision: 1.20 $";
UNLESS(PyExtensionClassCAPI=PyCObject_Import("ExtensionClass","CAPI"))
return;
......@@ -1878,75 +1882,3 @@ initBTree()
if (PyErr_Occurred())
Py_FatalError("can't initialize module BTree");
}
/*
PER_USE_OR_RETURN(self, NULL);
PER_ALLOW_DEACTIVATION(self);
*/
/*****************************************************************************
Revision Log:
$Log: BTree.c,v $
Revision 1.19 1999/03/10 00:14:35 klm
Committing with version 1.0 of the license.
Revision 1.18 1999/02/08 19:02:33 jim
updated copyright
Revision 1.17 1998/11/23 11:45:39 jim
removed license checks
Revision 1.16 1998/03/24 15:17:44 jim
Brought reinit/deactivate machinery up to date.
Revision 1.15 1998/02/18 22:19:50 jim
Fixed C inheritence problem. Waaaaaaa.
Revision 1.14 1998/02/05 17:46:17 jim
Added get methods.
Revision 1.13 1998/02/04 21:11:26 jim
Fixed two leaks in bucket values.
Revision 1.12 1997/12/31 17:18:04 jim
Fixed bugs related to deleting items.
Revision 1.11 1997/12/12 23:43:05 jim
Added basicnew support.
Revision 1.10 1997/11/13 20:45:51 jim
Fixed some bad return values.
Revision 1.9 1997/11/13 20:38:35 jim
added dcprotect
Revision 1.8 1997/11/03 15:17:53 jim
Fixed stupid bug in has_key methods.
Revision 1.7 1997/10/30 20:58:43 jim
Upped bucket sizes.
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
Fixed bug in setstate that allocates too much memory.
Revision 1.4 1997/09/17 17:20:32 jim
Fixed bug in deleting members from BTree.
Revision 1.3 1997/09/12 18:35:45 jim
Fixed bug leading to random core dumps.
Revision 1.2 1997/09/10 17:24:47 jim
*** empty log message ***
Revision 1.1 1997/09/08 18:42:21 jim
initial BTree
$Revision 1.1 1997/02/24 23:25:42 jim
$initial
$
*****************************************************************************/
......@@ -85,7 +85,7 @@
static char intSet_module_documentation[] =
""
"\n$Id: intSet.c,v 1.13 1999/05/01 20:35:22 jeffrey Exp $"
"\n$Id: intSet.c,v 1.14 1999/05/07 01:42:53 jim Exp $"
;
#include <limits.h>
......@@ -345,7 +345,7 @@ intSet_set_operation(intSet *self, PyObject *other,
o=INTSET(other);
PER_USE_OR_RETURN(self, NULL);
PER_USE_OR_RETURN(other, NULL);
PER_USE_OR_RETURN((intSet*)other, NULL);
od=o->data;
......@@ -611,7 +611,7 @@ void
initintSet()
{
PyObject *m, *d;
char *rev="$Revision: 1.13 $";
char *rev="$Revision: 1.14 $";
UNLESS(ExtensionClassImported) return;
......@@ -641,51 +641,3 @@ initintSet()
if (PyErr_Occurred())
Py_FatalError("can't initialize module intSet");
}
/**************************************************************************
Revision Log:
$Log: intSet.c,v $
Revision 1.13 1999/05/01 20:35:22 jeffrey
Removed use of importing malloc
Revision 1.12 1999/03/10 00:14:35 klm
Committing with version 1.0 of the license.
Revision 1.11 1999/02/08 19:02:34 jim
updated copyright
Revision 1.10 1998/11/23 11:45:40 jim
removed license checks
Revision 1.9 1998/03/24 15:17:34 jim
*** empty log message ***
Revision 1.8 1998/03/24 15:15:33 jim
Brought reinit/deactivate machinery up to date.
Revision 1.7 1998/02/18 22:19:39 jim
Fixed C inheritence problem. Waaaaaaa.
Revision 1.6 1997/12/12 23:48:07 jim
Added basicnew support.
Revision 1.5 1997/11/13 20:47:13 jim
Fixed some bad return values.
Revision 1.4 1997/11/13 20:38:39 jim
added dcprotect
Revision 1.3 1997/10/01 02:45:58 jim
Minor reformat.
Revision 1.2 1997/09/08 18:41:59 jim
Added logic to save data in binary form.
Revision 1.1 1997/08/05 14:55:22 jim
*** empty log message ***
**************************************************************************/
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