Commit 2fb67efd authored by Jim Fulton's avatar Jim Fulton

Fixed some bad return values.

parent 6938649b
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
static char BTree_module_documentation[] = static char BTree_module_documentation[] =
"" ""
"\n$Id: BTree.c,v 1.9 1997/11/13 20:38:35 jim Exp $" "\n$Id: BTree.c,v 1.10 1997/11/13 20:45:51 jim Exp $"
; ;
#define PERSISTENT #define PERSISTENT
...@@ -944,7 +944,7 @@ _BTree_set(BTree *self, PyObject *key, PyObject *value) ...@@ -944,7 +944,7 @@ _BTree_set(BTree *self, PyObject *key, PyObject *value)
iv=PyInt_AsLong(value); iv=PyInt_AsLong(value);
#endif #endif
PER_USE_OR_RETURN(self, NULL); PER_USE_OR_RETURN(self, -1);
UNLESS(self->data) if(BTree_init(self) < 0) goto err; UNLESS(self->data) if(BTree_init(self) < 0) goto err;
...@@ -1594,7 +1594,7 @@ static int ...@@ -1594,7 +1594,7 @@ static int
Bucket_length( Bucket *self) Bucket_length( Bucket *self)
{ {
int r; int r;
PER_USE_OR_RETURN(self, NULL); PER_USE_OR_RETURN(self, -1);
r=self->len; r=self->len;
PER_ALLOW_DEACTIVATION(self); PER_ALLOW_DEACTIVATION(self);
return r; return r;
...@@ -1610,7 +1610,7 @@ static int ...@@ -1610,7 +1610,7 @@ static int
BTree_length( BTree *self) BTree_length( BTree *self)
{ {
int r; int r;
PER_USE_OR_RETURN(self, NULL); PER_USE_OR_RETURN(self, -1);
r=self->count; r=self->count;
PER_ALLOW_DEACTIVATION(self); PER_ALLOW_DEACTIVATION(self);
return r; return r;
...@@ -1720,7 +1720,7 @@ initBTree() ...@@ -1720,7 +1720,7 @@ initBTree()
#endif #endif
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.9 $"; char *rev="$Revision: 1.10 $";
UNLESS(PyExtensionClassCAPI=PyCObject_Import("ExtensionClass","CAPI")) UNLESS(PyExtensionClassCAPI=PyCObject_Import("ExtensionClass","CAPI"))
return; return;
...@@ -1782,6 +1782,9 @@ initBTree() ...@@ -1782,6 +1782,9 @@ initBTree()
Revision Log: Revision Log:
$Log: BTree.c,v $ $Log: BTree.c,v $
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 Revision 1.9 1997/11/13 20:38:35 jim
added dcprotect added dcprotect
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
static char intSet_module_documentation[] = static char intSet_module_documentation[] =
"" ""
"\n$Id: intSet.c,v 1.4 1997/11/13 20:38:39 jim Exp $" "\n$Id: intSet.c,v 1.5 1997/11/13 20:47:13 jim Exp $"
; ;
#include <limits.h> #include <limits.h>
...@@ -122,7 +122,7 @@ intSet_modify(intSet *self, INTSET_DATA_TYPE ikey, int add) ...@@ -122,7 +122,7 @@ intSet_modify(intSet *self, INTSET_DATA_TYPE ikey, int add)
int min, max, i, l; int min, max, i, l;
INTSET_DATA_TYPE *data, k; INTSET_DATA_TYPE *data, k;
PER_USE_OR_RETURN(self, NULL); PER_USE_OR_RETURN(self, -1);
data=self->data; data=self->data;
...@@ -527,7 +527,7 @@ void ...@@ -527,7 +527,7 @@ void
initintSet() initintSet()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.4 $"; char *rev="$Revision: 1.5 $";
UNLESS(ExtensionClassImported) return; UNLESS(ExtensionClassImported) return;
...@@ -568,6 +568,9 @@ initintSet() ...@@ -568,6 +568,9 @@ initintSet()
Revision Log: Revision Log:
$Log: intSet.c,v $ $Log: intSet.c,v $
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 Revision 1.4 1997/11/13 20:38:39 jim
added dcprotect added dcprotect
......
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