[Python-checkins] python/dist/src/Modules _bsddb.c, 1.17.6.1,
1.17.6.2
greg at users.sourceforge.net
greg at users.sourceforge.net
Sun Sep 21 19:10:26 EDT 2003
- Previous message: [Python-checkins] python/dist/src/Modules _bsddb.c,1.17,1.17.6.1
- Next message: [Python-checkins] python/dist/src/Lib/bsddb __init__.py, 1.5.10.2,
1.5.10.3 db.py, 1.2, 1.2.16.1 dbshelve.py, 1.8,
1.8.10.1 dbutils.py, 1.6, 1.6.12.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv5605
Modified Files:
Tag: release23-maint
_bsddb.c
Log Message:
support for compiling with BerkeleyDB 4.2.x (soon to be released). this
is a partial version of the 1.18->1.19 patch. i left out the ability for
the module to also load as _pybsddb in addition to _bsddb as that applies
more to pybsddb than python.
Index: _bsddb.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_bsddb.c,v
retrieving revision 1.17.6.1
retrieving revision 1.17.6.2
diff -C2 -d -r1.17.6.1 -r1.17.6.2
*** _bsddb.c 21 Sep 2003 23:06:20 -0000 1.17.6.1
--- _bsddb.c 21 Sep 2003 23:10:23 -0000 1.17.6.2
***************
*** 37,41 ****
* Handwritten code to wrap version 3.x of the Berkeley DB library,
* written to replace a SWIG-generated file. It has since been updated
! * to compile with BerkeleyDB versions 3.2 through 4.1.
*
* This module was started by Andrew Kuchling to remove the dependency
--- 37,41 ----
* Handwritten code to wrap version 3.x of the Berkeley DB library,
* written to replace a SWIG-generated file. It has since been updated
! * to compile with BerkeleyDB versions 3.2 through 4.2.
*
* This module was started by Andrew Kuchling to remove the dependency
***************
*** 94,98 ****
#define DBVER (DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR)
! #define PY_BSDDB_VERSION "4.1.6"
static char *rcs_id = "$Id$";
--- 94,98 ----
#define DBVER (DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR)
! #define PY_BSDDB_VERSION "4.2.0"
static char *rcs_id = "$Id$";
***************
*** 2168,2171 ****
--- 2168,2182 ----
if (outFileName)
fclose(outFile);
+
+ /* DB.verify acts as a DB handle destructor (like close); this was
+ * documented in BerkeleyDB 4.2 but had the undocumented effect
+ * of not being safe in prior versions while still requiring an explicit
+ * DB.close call afterwards. Lets call close for the user to emulate
+ * the safe 4.2 behaviour. */
+ #if (DBVER <= 41)
+ self->db->close(self->db, 0);
+ #endif
+ self->db = NULL;
+
RETURN_IF_ERR();
RETURN_NONE();
***************
*** 4341,4346 ****
#define ADD_INT(dict, NAME) _addIntToDict(dict, #NAME, NAME)
-
-
DL_EXPORT(void) init_bsddb(void)
{
--- 4352,4355 ----
***************
*** 4387,4391 ****
--- 4396,4406 ----
ADD_INT(d, DB_MAX_RECORDS);
+ #if (DBVER >= 42)
+ ADD_INT(d, DB_RPCCLIENT);
+ #else
ADD_INT(d, DB_CLIENT);
+ /* allow apps to be written using DB_RPCCLIENT on older BerkeleyDB */
+ _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT);
+ #endif
ADD_INT(d, DB_XA_CREATE);
***************
*** 4536,4540 ****
ADD_INT(d, DB_CURLSN);
#endif
! #if (DBVER >= 33)
ADD_INT(d, DB_COMMIT);
#endif
--- 4551,4555 ----
ADD_INT(d, DB_CURLSN);
#endif
! #if ((DBVER >= 33) && (DBVER <= 41))
ADD_INT(d, DB_COMMIT);
#endif
***************
*** 4609,4612 ****
--- 4624,4639 ----
ADD_INT(d, DB_PANIC_ENVIRONMENT);
ADD_INT(d, DB_NOPANIC);
+ #endif
+
+ #if (DBVER >= 42)
+ ADD_INT(d, DB_TIME_NOTGRANTED);
+ ADD_INT(d, DB_TXN_NOT_DURABLE);
+ ADD_INT(d, DB_TXN_WRITE_NOSYNC);
+ ADD_INT(d, DB_LOG_AUTOREMOVE);
+ ADD_INT(d, DB_DIRECT_LOG);
+ ADD_INT(d, DB_DIRECT_DB);
+ ADD_INT(d, DB_INIT_REP);
+ ADD_INT(d, DB_ENCRYPT);
+ ADD_INT(d, DB_CHKSUM);
#endif
- Previous message: [Python-checkins] python/dist/src/Modules _bsddb.c,1.17,1.17.6.1
- Next message: [Python-checkins] python/dist/src/Lib/bsddb __init__.py, 1.5.10.2,
1.5.10.3 db.py, 1.2, 1.2.16.1 dbshelve.py, 1.8,
1.8.10.1 dbutils.py, 1.6, 1.6.12.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list