PKGBUILDs/extra/python24/db_fix.patch

50 lines
1.4 KiB
Diff
Raw Normal View History

2009-10-10 02:23:22 +00:00
Index: Modules/_bsddb.c
===================================================================
--- Modules/_bsddb.c (revision 57077)
+++ Modules/_bsddb.c (working copy)
@@ -3831,6 +3831,7 @@
}
+#if (DBVER < 45)
static PyObject*
DBEnv_set_lk_max(DBEnvObject* self, PyObject* args)
{
@@ -3846,6 +3847,7 @@
RETURN_IF_ERR();
RETURN_NONE();
}
+#endif
#if (DBVER >= 32)
@@ -4532,7 +4534,9 @@
{"set_lg_dir", (PyCFunction)DBEnv_set_lg_dir, METH_VARARGS},
{"set_lg_max", (PyCFunction)DBEnv_set_lg_max, METH_VARARGS},
{"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},
@@ -5039,7 +5043,9 @@
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
@@ -5074,7 +5080,9 @@
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);