| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
constructors raised an exception. backportes from trunk c63403.
|
| |
|
|
|
|
|
|
| |
Merge this fix from the pybsddb tree:
r293 | jcea | 2008-01-31 01:08:19 -0800 (Thu, 31 Jan 2008) | 4 lines
Solved memory leak when using cursors with
databases without environment.
|
| |
|
|
| |
* bump _bsddb patch version number.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Undoes incorrect dbtables fix and errant strdup introduced as
described below:
r58757 | gregory.p.smith | 2007-11-01 14:08:14 -0700 (Thu, 01 Nov 2007) | 4 lines
Fix bug introduced in revision 58385. Database keys could no longer
have NULL bytes in them. Replace the errant strdup with a
malloc+memcpy. Adds a unit test for the correct behavior.
r58758 | gregory.p.smith | 2007-11-01 14:15:36 -0700 (Thu, 01 Nov 2007) | 3 lines
Undo revision 58533 58534 fixes. Those were a workaround for
a problem introduced by 58385.
r58759 | gregory.p.smith | 2007-11-01 14:17:47 -0700 (Thu, 01 Nov 2007) | 2 lines
false "fix" undone as correct problem was found and fixed.
|
| |
|
|
| |
on DBCursor.get (and a friends) when passing in a string key.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Different versions of Berkeley DB handle this differently.
The comments and bug report should have the details. Memory is allocated
in 4.4 (and presumably earlier), but not in 4.5. Thus
4.5 has the free error, but not earlier versions.
Mostly update comments, plus make the free conditional.
|
| |
|
|
|
| |
Whoops, need to pay attention to those test failures.
Move the clear to *before* the first use, not after.
|
| |
|
|
| |
SF bug #1721309: Clear data so random memory does not get freed.
|
| |
|
|
| |
[backport of r53252]
|
| |
|
|
|
|
|
|
|
| |
Bug #1599782: Fix segfault on bsddb.db.DB().type().
The problem is that _DB_get_type() can't be called without the GIL
because it calls a bunch of PyErr_* APIs when an error occurs.
There were no other cases in this file that it was called without the GIL.
Removing the BEGIN/END THREAD around _DB_get_type() made everything work.
|
| | |
|
| |
|
|
| |
Klocwork 180-181
|
| |
|
|
|
|
|
| |
methods now allow their database parameter to be None as the
sleepycat API allows.
Also adds an appropriate test case for DBEnv.dbrename and dbremove.
|
| |
|
|
|
|
|
|
|
| |
it definitely could use some review to ensure I'm not off by one
and there's no possible overflow/wrap-around of bytes_left.
Reported by Klocwork #1.
Fix a problem if there is a failure allocating self->db.
Found with failmalloc.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
We know it's not NULL from the ParseTuple and DbObject_Check will verify
it's not NULL.
|
| |
|
|
|
|
| |
parameter strings") changed this function's signature
seemingly by mistake, which is causing buildbots to fail
test_bsddb3. Restored the pre-46688 signature.
|
| | |
|
| |
|
|
|
| |
results. It could previously incorrectly return 0 in some cases.
Fixes SF bug 1493322 (pybsddb bug 1184012).
|
| |
|
|
| |
supplied [SF pybsddb bug #1477863]
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
fix the additional rare (out of memory only) bug that it was supposed to fix
of not freeing log_list when the python allocator failed.
|
| |
|
|
|
|
|
| |
in BerkeleyDB >= 4.2 it tried to construct a list out of an uninitialized
char **log_list.
feature: export the DB_ARCH_REMOVE flag by name in the module on BerkeleyDB >= 4.2.
|
| |
|
|
| |
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
|
| |
|
|
|
| |
Also adds some backwards compatibility when compiling _bsddb.c on earlier
python versions (needed for pybsddb).
|
| |
|
|
| |
gcc 4.0.x wasn't complaining about *that* one ;)
|
| |
|
|
|
|
|
|
|
|
| |
missing PyObject_Del()'s, simplify some code by using Py_BuildValue()
instead of creating a tuple with items manually, stop clobbering builtin
exceptions in a few places, and guard against NULL-returning functions some
more.
This fixes 117 of the 780 (!?!#%@#$!!) reference leaks in test_bsddb3. I
ain't not done yet, although this review of 5kloc was just the easy part.
|
| |
|
|
| |
Normalize coding style.
|
| | |
|
| |
|
|
| |
Will backport.
|
| |
|
|
|
|
|
|
|
| |
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.)
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
is ok for a standalone pybsddb source dist for use with <= 2.3.
|
| | |
|
| |
|
|
| |
Will backport.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
way back thru 3.2). This should be backported to the release24-maint
branch.
|
| |
|
|
| |
Probably should be backported.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 *.
|
| | |
|
| | |
|
| |
|
|
|
| |
arguments (left, right) like any sane comparison function. no need to
pass in the db object as an argument.
|