summaryrefslogtreecommitdiff
path: root/lib/tdb/pytdb.c
AgeCommit message (Collapse)AuthorFilesLines
2010-12-21pytdb: Make PyTdb variable static.Jelmer Vernooij1-3/+3
2010-11-22Avoid the use of PyAPI_DATA, which is for internal Python API's.Arnaud Faucher1-1/+1
Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Mon Nov 22 00:52:56 CET 2010 on sn-devel-104
2010-10-04pytdb: Add __version__ attribute.Jelmer Vernooij1-0/+2
2010-10-02pytdb: Include Python.h first to prevent warning.Jelmer Vernooij1-1/+1
2010-10-02pytdb: Check errors after PyObject_New() callsKirill Smelkov1-0/+7
The call could fail with e.g. MemoryError, and we'll dereference NULL pointer without checking. Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-02pytdb: Add support for tdb_repack()Kirill Smelkov1-0/+9
Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-02pytdb: Add TDB_INCOMPATIBLE_HASH open flagKirill Smelkov1-0/+1
In 2dcf76 Rusty added TDB_INCOMPATIBLE_HASH open flag which selects Jenkins lookup3 hash for new databases. Expose this flag to python users too. Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19pytdb: Make filename argument optional.Jelmer Vernooij1-5/+11
2010-09-19pytdb: Add support for tdb_freelist_size()Kirill Smelkov1-0/+6
Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19pytdb: Add support for tdb_transaction_prepare_commit()Kirill Smelkov1-0/+10
Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19pytdb: Add support for tdb_enable_seqnum, tdb_get_seqnum and ↵Kirill Smelkov1-0/+23
tdb_increment_seqnum_nonblock Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19pytdb: Update open flags to match those for tdb_open() in tdb.hKirill Smelkov1-0/+6
Namely TDB_NOSYNC, TDB_SEQNUM, TDB_VOLATILE, TDB_ALLOW_NESTING and TDB_DISALLOW_NESTING were missing. Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19pytdb: Fix repr segfault for internal dbKirill Smelkov1-1/+3
The problem was tdb->name is NULL for TDB_INTERNAL databases, and so it was crashing ... #0 0xb76944f3 in strlen () from /lib/i686/cmov/libc.so.6 #1 0x0809862b in PyString_FromFormatV (format=0xb72b6a26 "Tdb('%s')", vargs=0xbfc26a94 "") at ../Objects/stringobject.c:211 #2 0x08098888 in PyString_FromFormat (format=0xb72b6a26 "Tdb('%s')") at ../Objects/stringobject.c:358 #3 0xb72b65f2 in tdb_object_repr (self=0xb759e060) at ./pytdb.c:439 Cc: 597089@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19pytdb: Add support for tdb_add_flags() & tdb_remove_flags()Kirill Smelkov1-0/+23
Note, unlike tdb_open where flags is `int', tdb_{add,remove}_flags want flags as `unsigned', so instead of "i" I used "I" in PyArg_ParseTuple. Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-04-20tdb: update tdb ABI to use hide_symbols=TrueAndrew Tridgell1-10/+0
We now use -fvisibilty=hidden to hide symbols from outside the tdb shared library. This also moved tdb_transaction_recover() into the tdb_private.h header, as it should never have been a public API. For that reason we are changing the version number. We're only doing a minor version increment as it is extremely unlikely that anyone was actually using tdb_transaction_recover() as its locking requirements were rather unusual. Pair-Programmed-With: Rusty Russell <rusty@samba.org>
2009-10-29tdb: fix typo in python's Tdb.get() docstringKirill Smelkov1-1/+1
It's Tdb.get(), not Tdb.fetch(). Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-29tdb: kill last bits from swigKirill Smelkov1-1/+1
We no longer use swig for pytdb, so there is no need for swig make rules. Also pytdb.c header should be updated. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-30s3 build: Remove unused fstat check to fix a bunch of HAVE_FSTAT warningsTim Prouty1-4/+0
2009-01-30lib/tdb: include replace.h and system/filesys.h in pytdb.cStefan Metzmacher1-4/+3
This fixes the build on Tru64. metze
2009-01-08Avoid using a utility header for Python replacements included in Samba,Jelmer Vernooij1-1/+5
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-07s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4Tim Prouty1-1/+1
2009-01-06py: Properly increase the reference counter of Py_None.Jelmer Vernooij1-16/+16
2008-12-18Make sure to not close tdb database more than once.Jelmer Vernooij1-2/+10
2008-12-18Implement missing functions in pytdb.Jelmer Vernooij1-2/+62
2008-12-18Add simple manually written replacement for the tdb module.Jelmer Vernooij1-0/+449