summaryrefslogtreecommitdiffstats
path: root/Modules/bsddbmodule.c
diff options
context:
space:
mode:
authorPeter Schneider-Kamp <nowonder@nowonder.de>2000-07-10 17:06:38 (GMT)
committerPeter Schneider-Kamp <nowonder@nowonder.de>2000-07-10 17:06:38 (GMT)
commitcb27c35aa6c126b8104aaa96b26c3718c1b88880 (patch)
tree38d41d02cac5cab101c8fd6aecf368b6dfd3ccba /Modules/bsddbmodule.c
parent6a85027a97d090e2a7e38bb37d816ca22d072760 (diff)
downloadcpython-cb27c35aa6c126b8104aaa96b26c3718c1b88880.zip
cpython-cb27c35aa6c126b8104aaa96b26c3718c1b88880.tar.gz
cpython-cb27c35aa6c126b8104aaa96b26c3718c1b88880.tar.bz2
ANSI-fication, not really tested, but should (hopefully) compile
Diffstat (limited to 'Modules/bsddbmodule.c')
-rw-r--r--Modules/bsddbmodule.c111
1 files changed, 24 insertions, 87 deletions
diff --git a/Modules/bsddbmodule.c b/Modules/bsddbmodule.c
index 23c2894..c211d23 100644
--- a/Modules/bsddbmodule.c
+++ b/Modules/bsddbmodule.c
@@ -54,17 +54,8 @@ staticforward PyTypeObject Bsddbtype;
static PyObject *BsddbError;
static PyObject *
-newdbhashobject(file, flags, mode,
- bsize, ffactor, nelem, cachesize, hash, lorder)
- char *file;
- int flags;
- int mode;
- int bsize;
- int ffactor;
- int nelem;
- int cachesize;
- int hash; /* XXX ignored */
- int lorder;
+newdbhashobject(char *file, int flags, int mode,
+ int bsize, int ffactor, int nelem, int cachesize, int hash, int lorder)
{
bsddbobject *dp;
HASHINFO info;
@@ -108,17 +99,8 @@ newdbhashobject(file, flags, mode,
}
static PyObject *
-newdbbtobject(file, flags, mode,
- btflags, cachesize, maxkeypage, minkeypage, psize, lorder)
- char *file;
- int flags;
- int mode;
- int btflags;
- int cachesize;
- int maxkeypage;
- int minkeypage;
- int psize;
- int lorder;
+newdbbtobject(char *file, int flags, int mode,
+ int btflags, int cachesize, int maxkeypage, int minkeypage, int psize, int lorder)
{
bsddbobject *dp;
BTREEINFO info;
@@ -164,18 +146,8 @@ newdbbtobject(file, flags, mode,
}
static PyObject *
-newdbrnobject(file, flags, mode,
- rnflags, cachesize, psize, lorder, reclen, bval, bfname)
- char *file;
- int flags;
- int mode;
- int rnflags;
- int cachesize;
- int psize;
- int lorder;
- size_t reclen;
- u_char bval;
- char *bfname;
+newdbrnobject(char *file, int flags, int mode,
+ int rnflags, int cachesize, int psize, int lorder, size_t reclen, u_char bval, char *bfname)
{
bsddbobject *dp;
RECNOINFO info;
@@ -220,8 +192,7 @@ newdbrnobject(file, flags, mode,
}
static void
-bsddb_dealloc(dp)
- bsddbobject *dp;
+bsddb_dealloc(bsddbobject *dp)
{
#ifdef WITH_THREAD
if (dp->di_lock) {
@@ -253,8 +224,7 @@ bsddb_dealloc(dp)
#endif
static int
-bsddb_length(dp)
- bsddbobject *dp;
+bsddb_length(bsddbobject *dp)
{
if (dp->di_bsddb == NULL) {
PyErr_SetString(BsddbError, "BSDDB object has already been closed");
@@ -282,9 +252,7 @@ bsddb_length(dp)
}
static PyObject *
-bsddb_subscript(dp, key)
- bsddbobject *dp;
- PyObject *key;
+bsddb_subscript(bsddbobject *dp, PyObject *key)
{
int status;
DBT krec, drec;
@@ -321,9 +289,7 @@ bsddb_subscript(dp, key)
}
static int
-bsddb_ass_sub(dp, key, value)
- bsddbobject *dp;
- PyObject *key, *value;
+bsddb_ass_sub(bsddbobject *dp, PyObject *key, PyObject *value)
{
int status;
DBT krec, drec;
@@ -387,9 +353,7 @@ static PyMappingMethods bsddb_as_mapping = {
};
static PyObject *
-bsddb_close(dp, args)
- bsddbobject *dp;
- PyObject *args;
+bsddb_close(bsddbobject *dp, PyObject *args)
{
if (!PyArg_NoArgs(args))
return NULL;
@@ -410,9 +374,7 @@ bsddb_close(dp, args)
}
static PyObject *
-bsddb_keys(dp, args)
- bsddbobject *dp;
- PyObject *args;
+bsddb_keys(bsddbobject *dp, PyObject *args)
{
PyObject *list, *item;
DBT krec, drec;
@@ -467,9 +429,7 @@ bsddb_keys(dp, args)
}
static PyObject *
-bsddb_has_key(dp, args)
- bsddbobject *dp;
- PyObject *args;
+bsddb_has_key(bsddbobject *dp, PyObject *args)
{
DBT krec, drec;
int status;
@@ -494,9 +454,7 @@ bsddb_has_key(dp, args)
}
static PyObject *
-bsddb_set_location(dp, key)
- bsddbobject *dp;
- PyObject *key;
+bsddb_set_location(bsddbobject *dp, PyObject *key)
{
int status;
DBT krec, drec;
@@ -532,10 +490,7 @@ bsddb_set_location(dp, key)
}
static PyObject *
-bsddb_seq(dp, args, sequence_request)
- bsddbobject *dp;
- PyObject *args;
- int sequence_request;
+bsddb_seq(bsddbobject *dp, PyObject *args, int sequence_request)
{
int status;
DBT krec, drec;
@@ -577,37 +532,27 @@ bsddb_seq(dp, args, sequence_request)
}
static PyObject *
-bsddb_next(dp, key)
- bsddbobject *dp;
- PyObject *key;
+bsddb_next(bsddbobject *dp, PyObject *key)
{
return bsddb_seq(dp, key, R_NEXT);
}
static PyObject *
-bsddb_previous(dp, key)
- bsddbobject *dp;
- PyObject *key;
+bsddb_previous(bsddbobject *dp, PyObject *key)
{
return bsddb_seq(dp, key, R_PREV);
}
static PyObject *
-bsddb_first(dp, key)
- bsddbobject *dp;
- PyObject *key;
+bsddb_first(bsddbobject *dp, PyObject *key)
{
return bsddb_seq(dp, key, R_FIRST);
}
static PyObject *
-bsddb_last(dp, key)
- bsddbobject *dp;
- PyObject *key;
+bsddb_last(bsddbobject *dp, PyObject *key)
{
return bsddb_seq(dp, key, R_LAST);
}
static PyObject *
-bsddb_sync(dp, args)
- bsddbobject *dp;
- PyObject *args;
+bsddb_sync(bsddbobject *dp, PyObject *args)
{
int status;
@@ -637,9 +582,7 @@ static PyMethodDef bsddb_methods[] = {
};
static PyObject *
-bsddb_getattr(dp, name)
- PyObject *dp;
- char *name;
+bsddb_getattr(PyObject *dp, char *name)
{
return Py_FindMethod(bsddb_methods, dp, name);
}
@@ -662,9 +605,7 @@ static PyTypeObject Bsddbtype = {
};
static PyObject *
-bsdhashopen(self, args)
- PyObject *self;
- PyObject *args;
+bsdhashopen(PyObject *self, PyObject *args)
{
char *file;
char *flag = NULL;
@@ -715,9 +656,7 @@ bsdhashopen(self, args)
}
static PyObject *
-bsdbtopen(self, args)
- PyObject *self;
- PyObject *args;
+bsdbtopen(PyObject *self, PyObject *args)
{
char *file;
char *flag = NULL;
@@ -769,9 +708,7 @@ bsdbtopen(self, args)
}
static PyObject *
-bsdrnopen(self, args)
- PyObject *self;
- PyObject *args;
+bsdrnopen(PyObject *self, PyObject *args)
{
char *file;
char *flag = NULL;