summaryrefslogtreecommitdiffstats
path: root/lib/tdb/pytdb.c
Commit message (Collapse)AuthorAgeFilesLines
* tdb: fix a build warning.Günther Deschner2011-05-061-0/+1
| | | | Guenther
* s4-python: Only set BASETYPE flag if subclassing is supported.Jelmer Vernooij2011-01-011-1/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Jan 1 03:39:58 CET 2011 on sn-devel-104
* pytdb: Make PyTdb variable static.Jelmer Vernooij2010-12-211-3/+3
|
* Avoid the use of PyAPI_DATA, which is for internal Python API's.Arnaud Faucher2010-11-221-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
* pytdb: Add __version__ attribute.Jelmer Vernooij2010-10-041-0/+2
|
* pytdb: Include Python.h first to prevent warning.Jelmer Vernooij2010-10-021-1/+1
|
* pytdb: Check errors after PyObject_New() callsKirill Smelkov2010-10-021-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>
* pytdb: Add support for tdb_repack()Kirill Smelkov2010-10-021-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>
* pytdb: Add TDB_INCOMPATIBLE_HASH open flagKirill Smelkov2010-10-021-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>
* pytdb: Make filename argument optional.Jelmer Vernooij2010-09-191-5/+11
|
* pytdb: Add support for tdb_freelist_size()Kirill Smelkov2010-09-191-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>
* pytdb: Add support for tdb_transaction_prepare_commit()Kirill Smelkov2010-09-191-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>
* pytdb: Add support for tdb_enable_seqnum, tdb_get_seqnum and ↵Kirill Smelkov2010-09-191-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>
* pytdb: Update open flags to match those for tdb_open() in tdb.hKirill Smelkov2010-09-191-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>
* pytdb: Fix repr segfault for internal dbKirill Smelkov2010-09-191-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>
* pytdb: Add support for tdb_add_flags() & tdb_remove_flags()Kirill Smelkov2010-09-191-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>
* tdb: update tdb ABI to use hide_symbols=TrueAndrew Tridgell2010-04-201-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>
* tdb: fix typo in python's Tdb.get() docstringKirill Smelkov2009-10-291-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>
* tdb: kill last bits from swigKirill Smelkov2009-10-291-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>
* s3 build: Remove unused fstat check to fix a bunch of HAVE_FSTAT warningsTim Prouty2009-01-301-4/+0
|
* lib/tdb: include replace.h and system/filesys.h in pytdb.cStefan Metzmacher2009-01-301-4/+3
| | | | | | This fixes the build on Tru64. metze
* Avoid using a utility header for Python replacements included in Samba,Jelmer Vernooij2009-01-081-1/+5
| | | | since this will not be shipped with talloc/tdb/tevent/etc.
* s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4Tim Prouty2009-01-071-1/+1
|
* py: Properly increase the reference counter of Py_None.Jelmer Vernooij2009-01-061-16/+16
|
* Make sure to not close tdb database more than once.Jelmer Vernooij2008-12-181-2/+10
|
* Implement missing functions in pytdb.Jelmer Vernooij2008-12-181-2/+62
|
* Add simple manually written replacement for the tdb module.Jelmer Vernooij2008-12-181-0/+449