summaryrefslogtreecommitdiffstats
path: root/Modules/_bsddb.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix DBEnv's set_tx_timestamp wrapper to be slightly more correct onThomas Wouters2006-03-011-4/+5
| | | | | | | | | non-32bit platforms. Will still only allow 32 bits in a timestamp on Win64, but at least it won't crash, and it'll work right on platforms where longs are big enough to contain time_t's. (A better-working, although conceptually less-right fix would have been to use Py_ssize_t here, but Martin and Tim won't let me.)
* Another bit of unconstification.Tim Peters2006-02-281-1/+1
|
* More unconsting.Martin v. Löwis2006-02-271-33/+33
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-3/+3
|
* maintain support for older python versions in this module so that itGregory P. Smith2006-01-301-0/+16
| | | | is ok for a standalone pybsddb source dist for use with <= 2.3.
* Add wrapper for DBEnv.set_tx_timeout method to allow time based DB_RECOVERGregory P. Smith2006-01-271-3/+18
|
* Fix bug #1413192, fix seg fault in bsddb if a txn was deleted before the env.Neal Norwitz2006-01-251-3/+6
| | | | Will backport.
* commits sourceforge patch #1407992 by neil.norwitz.Gregory P. Smith2006-01-241-7/+7
| | | | | | this fixes the bsddb db associate tests when compiled against BerkeleyDB 3.3 thru 4.1. 4.2 thru 4.4 already passed and still pass.
* Support for BerkeleyDB 4.4 (tested against 4.4.20 as well as all theGregory P. Smith2006-01-241-2/+16
| | | | | way back thru 3.2). This should be backported to the release24-maint branch.
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Fix errors on 64-bit platforms. Will backportNeal Norwitz2006-01-051-4/+4
|
* Add const to several API functions that take char *.Jeremy Hylton2005-12-101-34/+44
| | | | | | | | | | | | | | | | | | | In C++, it's an error to pass a string literal to a char* function without a const_cast(). Rather than require every C++ extension module to put a cast around string literals, fix the API to state the const-ness. I focused on parts of the API where people usually pass literals: PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type slots, etc. Predictably, there were a large set of functions that needed to be fixed as a result of these changes. The most pervasive change was to make the keyword args list passed to PyArg_ParseTupleAndKewords() to be a const char *kwlist[]. One cast was required as a result of the changes: A type object mallocs the memory for its tp_doc slot and later frees it. PyTypeObject says that tp_doc is const char *; but if the type was created by type_new(), we know it is safe to cast to char *.
* Get bsddb module to compile with version 3.2 of BSD DB.Neal Norwitz2005-10-201-0/+8
|
* remove c++ style commentGregory P. Smith2005-06-161-1/+1
|
* change set_bt_compare() callback comparison function to only take twoGregory P. Smith2005-06-061-10/+7
| | | | | arguments (left, right) like any sane comparison function. no need to pass in the db object as an argument.
* additional sanity check. secondaryDB cannot be closed.Gregory P. Smith2005-06-061-0/+1
|
* fixes pybsddb SF bug id 1215432. DB.associate() would crash when aGregory P. Smith2005-06-061-5/+3
| | | | | | DBError was supposed to be raised. needs backport to 2.4.x and possibly 2.3.x.
* pybsddb 4.3.2:Gregory P. Smith2005-06-041-24/+64
| | | | | | | | | | | * the has_key() method was not raising a DBError when a database error had occurred. [SF patch id 1212590] * added a wrapper for the DBEnv.set_lg_regionmax method [SF patch id 1212590] * DBKeyEmptyError now derives from KeyError just like DBNotFoundError. * internally everywhere DB_NOTFOUND was checked for has been updated to also check for DB_KEYEMPTY. This fixes the semantics of a couple operations on recno and queue databases to be more intuitive and results in less unexpected DBKeyEmptyError exceptions being raised.
* pybsddb 4.3.1, adds support for DB.set_bt_compare database btree comparisonGregory P. Smith2005-06-031-1/+163
| | | | | | functions written in python. contributed by <frederic.gobry@epfl.ch>
* fixed compilation against BerkeleyDB 3.2.9 (sf bug # 1077040)Gregory P. Smith2004-12-161-0/+8
|
* * Adds support for building against BerkeleyDB 4.3.21Gregory P. Smith2004-12-131-21/+74
| | | | * bumped the module version number up to 4.3.0
* SF bug 1017405: the keys() values() and items() DB methods wereGregory P. Smith2004-09-041-1/+1
| | | | ignoring their transaction (txn) argument.
* Fix memory leak and bump the version per GregNeal Norwitz2004-07-091-2/+2
|
* Cleanup support for older pythons (perhaps it should be removed?)Neal Norwitz2004-07-091-53/+10
|
* Adds support for DB.pget and DBCursor.pget methods.Gregory P. Smith2004-06-281-3/+198
| | | | | Based on a patch supplied by Ian Ward <ian@arevco.ca> on the pybsddb mailing list 2004-03-26.
* Add weakref support to all bsddb.db objects.Gregory P. Smith2004-06-281-7/+127
| | | | | Make DBTxn objects automatically call abort() in their destructor if not yet finalized and raise a RuntimeWarning to that effect.
* raise the module minor version.Gregory P. Smith2004-06-271-1/+1
|
* SF patch / bug #967763Gregory P. Smith2004-06-271-43/+76
| | | | | | | | | | | | Fix memory leaks revealed by valgrind and ensuing code inspection. In the existing test suite valgrind revealed two memory leaks (DB_get and DBC_set_range). Code inspection revealed that there were many other potential similar leaks (many on odd code error paths such as passing something other than a DBTxn object for a txn= parameter or in the face of an out of memory error). The most common case that would cause a leak was when using recno or queue format databases with integer keys, sometimes only with an exception exit.
* A few more PyThreadState_Get to PyThreadState_GET conversionsNicholas Bastin2004-03-251-1/+1
|
* fixes SF bug 914019 - DB.has_key was not honoring its txn argumentGregory P. Smith2004-03-161-2/+2
|
* Fixes SF bug # 778421Gregory P. Smith2004-02-261-2/+10
| | | | | | | | | * Fixed a bug in the compatibility interface set_location() method where it would not properly search to the next nearest key when used on BTree databases. [SF bug id 788421] * Fixed a bug in the compatibility interface set_location() method where it could crash when looking up keys in a hash or recno format database due to an incorrect free().
* Removing TODO comment for None keys, as suggested by Neal Norwitz.Gustavo Niemeyer2004-01-201-1/+1
|
* When key is None, give up if _DB_get_type() returns -1 as well.Gustavo Niemeyer2004-01-201-0/+2
|
* Fixing #880531: raise TypeError when trying to use a None key with RECNOGustavo Niemeyer2004-01-201-0/+7
| | | | or QUEUE database.
* * SF patch 835100 - C++ // comments are not allowed. Use /* */Gregory P. Smith2003-11-031-8/+8
|
* * Use weakref's of DBCursor objects for the iterator cursors to avoid aGregory P. Smith2003-11-031-2/+38
| | | | | | | | | | memory leak that would've occurred for all iterators that were destroyed before having iterated until they raised StopIteration. * Simplify some code. * Add new test cases to check for the memleak and ensure that mixing iteration with modification of the values for existing keys works.
* * Fix the singlethreaded deadlocks occurring in the simple bsddb interface.Gregory P. Smith2003-11-021-1/+1
| | | | | * Add support for multiple iterator/generator objects at once on the simple bsddb _DBWithCursor interface.
* Fix a tuple memory leak when raising DB, DBEnv and DBCursor "objectGregory P. Smith2003-11-021-17/+15
| | | | | | | | | has been closed" exceptions. Adds a DBCursorClosedError exception in the closed cursor case for future use in fixing the legacy bsddb interface deadlock problems due to its use of cursors with DB_INIT_LOCK | DB_THREAD support enabled.
* bsddb3 4.2.2, adds DBCursor.get_current_size() method to return the lengthGregory P. Smith2003-10-011-1/+35
| | | | of the current value without reading the value itself.
* raise pybsddb version number to 4.2.1 to differentiate between it and theGregory P. Smith2003-09-211-1/+1
| | | | version in the python 2.3.1 tree.
* Adds basic support for BerkeleyDB 4.2.x. Compiles and passes tests; newGregory P. Smith2003-09-211-5/+44
| | | | | | | | | | features in BerkeleyDB not exposed. notably: the DB_MPOOLFILE interface has not yet been wrapped in an object. Adds support for building and installing bsddb3 in python2.3 that has an older version of this module installed as bsddb without conflicts. The pybsddb.sf.net build/packaged version of the module uses a dynamicly loadable module called _pybsddb rather than _bsddb.
* Support DBEnv.set_shm_key() to allow multi-threaded multi-processGregory P. Smith2003-08-281-0/+16
| | | | database environments to use shared memory on systems supporting it.
* heck environment closed status before closing a cursors. Fixes #763928.Martin v. Löwis2003-07-151-1/+8
|
* bsddb 4.1.6:Gregory P. Smith2003-07-091-41/+110
| | | | | | | | | | | * Extended DB & DBEnv set_get_returns_none functionality to take a "level" instead of a boolean flag. The boolean 0 and 1 values still have the same effect. A value of 2 extends the "return None instead of raising an exception" behaviour to the DBCursor set methods. This will become the default behaviour in pybsddb 4.2. * Fixed a typo in DBCursor.join_item method that made it crash instead of returning a value. Obviously nobody uses it. Wrote a test case for join and join_item.
* Fix a typo/cut-n-paste error in DBCursor.join_item so that it doesn'tGregory P. Smith2003-07-071-1/+1
| | | | | return a tuple. (this also implies that nobody uses this method; the bug has been here for a long time)
* DB.remove() needs to set the internal DB handle to NULL after being called.Gregory P. Smith2003-05-151-4/+1
| | | | | | | (sourceforge pybsddb bug #737970). Also: don't allow other threads to run during calls that invalidate the DB handle.
* Added a comment about backward compatibility requirements and a linkBarry Warsaw2003-04-241-1/+9
| | | | to the PyBSDDB project at SourceForge.
* Update to the new PyGILState APIs to simplify and correct thread-stateMark Hammond2003-04-221-2/+15
| | | | | management. Old code still #ifdef'd out - I may remove this in a sec, but for now, let's get it in and things passing the tests again!
* init_bsddb(): Added a few symbols that Greg forgot.Barry Warsaw2003-03-311-1/+4
|
* 4.1.5Gregory P. Smith2003-03-271-1/+1
|