2 ===================================================================
3 --- setup.py (revision 74955)
4 +++ setup.py (working copy)
6 # a release. Most open source OSes come with one or more
7 # versions of BerkeleyDB already installed.
12 db_setup_debug = False # verbose debug prints from this script?
14 Index: Modules/_bsddb.c
15 ===================================================================
16 --- Modules/_bsddb.c (revision 74955)
17 +++ Modules/_bsddb.c (working copy)
19 #define DB_BUFFER_SMALL ENOMEM
23 +#define DB_GID_SIZE DB_XIDDATASIZE
27 /* --------------------------------------------------------------------- */
28 /* Structure definitions */
30 @@ -4501,7 +4505,11 @@
32 #define PREPLIST_LEN 16
33 DB_PREPLIST preplist[PREPLIST_LEN];
40 CHECK_ENV_NOT_CLOSED(self);
43 flags=DB_NEXT; /* Prepare for next loop pass */
44 for (i=0; i<retp; i++) {
45 gid=PyBytes_FromStringAndSize((char *)(preplist[i].gid),
57 DBEnv_set_rpc_server(DBEnvObject* self, PyObject* args, PyObject* kwargs)
66 DBEnv_set_verbose(DBEnvObject* self, PyObject* args)
68 if (!PyArg_ParseTuple(args, "s#:prepare", &gid, &gid_size))
71 - if (gid_size != DB_XIDDATASIZE) {
72 + if (gid_size != DB_GID_SIZE) {
73 PyErr_SetString(PyExc_TypeError,
74 - "gid must be DB_XIDDATASIZE bytes long");
75 + "gid must be DB_GID_SIZE bytes long");
79 @@ -6539,8 +6549,10 @@
81 {"set_get_returns_none",(PyCFunction)DBEnv_set_get_returns_none, METH_VARARGS},
82 {"txn_recover", (PyCFunction)DBEnv_txn_recover, METH_NOARGS},
84 {"set_rpc_server", (PyCFunction)DBEnv_set_rpc_server,
85 METH_VARARGS||METH_KEYWORDS},
87 {"set_verbose", (PyCFunction)DBEnv_set_verbose, METH_VARARGS},
89 {"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS},
91 ADD_INT(d, DB_MAX_PAGES);
92 ADD_INT(d, DB_MAX_RECORDS);
96 ADD_INT(d, DB_RPCCLIENT);
98 @@ -7096,7 +7109,11 @@
99 /* allow apps to be written using DB_RPCCLIENT on older Berkeley DB */
100 _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT);
105 ADD_INT(d, DB_XA_CREATE);
108 ADD_INT(d, DB_CREATE);
109 ADD_INT(d, DB_NOMMAP);
110 @@ -7113,7 +7130,13 @@
111 ADD_INT(d, DB_INIT_TXN);
112 ADD_INT(d, DB_JOINENV);
115 + ADD_INT(d, DB_GID_SIZE);
117 ADD_INT(d, DB_XIDDATASIZE);
118 + /* Allow new code to work in old BDB releases */
119 + _addIntToDict(d, "DB_GID_SIZE", DB_XIDDATASIZE);
122 ADD_INT(d, DB_RECOVER);
123 ADD_INT(d, DB_RECOVER_FATAL);