summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2007-01-05 01:59:42 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2007-01-05 01:59:42 (GMT)
commit8b96a35d14c0ec5db5f32321e544269a5b0a8759 (patch)
treee34f90949bb24daab02c775616f5e96875f1da5a /Modules
parent7b7c9d420817e5ffb5fd3adbc19a9be4ba0f4604 (diff)
downloadcpython-8b96a35d14c0ec5db5f32321e544269a5b0a8759.zip
cpython-8b96a35d14c0ec5db5f32321e544269a5b0a8759.tar.gz
cpython-8b96a35d14c0ec5db5f32321e544269a5b0a8759.tar.bz2
Support linking of the bsddb module against BerkeleyDB 4.5.x
(will backport to 2.5)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_bsddb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index e6046e7..13b5b7b 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -4127,6 +4127,7 @@ DBEnv_set_lk_detect(DBEnvObject* self, PyObject* args)
}
+#if (DBVER < 45)
static PyObject*
DBEnv_set_lk_max(DBEnvObject* self, PyObject* args)
{
@@ -4142,6 +4143,7 @@ DBEnv_set_lk_max(DBEnvObject* self, PyObject* args)
RETURN_IF_ERR();
RETURN_NONE();
}
+#endif
#if (DBVER >= 32)
@@ -5231,7 +5233,9 @@ static PyMethodDef DBEnv_methods[] = {
{"set_lg_regionmax",(PyCFunction)DBEnv_set_lg_regionmax, METH_VARARGS},
#endif
{"set_lk_detect", (PyCFunction)DBEnv_set_lk_detect, METH_VARARGS},
+#if (DBVER < 45)
{"set_lk_max", (PyCFunction)DBEnv_set_lk_max, METH_VARARGS},
+#endif
#if (DBVER >= 32)
{"set_lk_max_locks", (PyCFunction)DBEnv_set_lk_max_locks, METH_VARARGS},
{"set_lk_max_lockers", (PyCFunction)DBEnv_set_lk_max_lockers, METH_VARARGS},
@@ -5833,7 +5837,9 @@ DL_EXPORT(void) init_bsddb(void)
ADD_INT(d, DB_AFTER);
ADD_INT(d, DB_APPEND);
ADD_INT(d, DB_BEFORE);
+#if (DBVER < 45)
ADD_INT(d, DB_CACHED_COUNTS);
+#endif
#if (DBVER >= 41)
_addIntToDict(d, "DB_CHECKPOINT", 0);
#else
@@ -5868,7 +5874,9 @@ DL_EXPORT(void) init_bsddb(void)
ADD_INT(d, DB_POSITION);
ADD_INT(d, DB_PREV);
ADD_INT(d, DB_PREV_NODUP);
+#if (DBVER < 45)
ADD_INT(d, DB_RECORDCOUNT);
+#endif
ADD_INT(d, DB_SET);
ADD_INT(d, DB_SET_RANGE);
ADD_INT(d, DB_SET_RECNO);