summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/tdb/pytdb.c
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-build: Remove duplicate tdb libraryAmitay Isaacs2014-06-201-685/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4Matthias Dieter Wallnöfer2014-01-091-4/+0
| | | | | | | | | http://www.python.org/doc//current/c-api/none.html Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date(master): Thu Jan 9 16:27:47 CET 2014 on sn-devel-104
* tdb: Sync to tdb 1.2.11 from upstreamAmitay Isaacs2013-05-291-10/+96
| | | | (This used to be ctdb commit bb3a32ec055432afc7225c9fd7504fb187694bda)
* lib/tdb: Sync tdb from samba git treeAmitay Isaacs2012-04-131-6/+8
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0f40ea2386892ae10b30beeded0e00edf4c019c3)
* pytdb: Add __version__ attribute.Jelmer Vernooij2010-10-071-0/+2
| | | | (This used to be ctdb commit 2b81314eb94d31f4efadd2a3dcf2f6e176338d3f)
* pytdb: Include Python.h first to prevent warning.Jelmer Vernooij2010-10-071-1/+1
| | | | (This used to be ctdb commit 247dacde0d0de1358cc2c27d08914be605272023)
* pytdb: Check errors after PyObject_New() callsKirill Smelkov2010-10-071-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> (This used to be ctdb commit 09369aa86e233a58ed131fa5b7584b6c86527d40)
* pytdb: Add support for tdb_repack()Kirill Smelkov2010-10-071-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> (This used to be ctdb commit ce84abcc6be31554da73920280e6bfc5b63b1464)
* pytdb: Add TDB_INCOMPATIBLE_HASH open flagKirill Smelkov2010-10-071-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> (This used to be ctdb commit 07880810941850e81442b888cd70d810d3f80fc3)
* pytdb: Make filename argument optional.Jelmer Vernooij2010-10-071-5/+11
| | | | (This used to be ctdb commit 3cc73c51caff51e0cba688aefd6f37e632c0e8d4)
* pytdb: Add support for tdb_freelist_size()Kirill Smelkov2010-10-071-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> (This used to be ctdb commit dcdd83e6d6786f0857acdf9aa04bca74a7ccf14d)
* pytdb: Add support for tdb_transaction_prepare_commit()Kirill Smelkov2010-10-071-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> (This used to be ctdb commit fd16bcc1434841d84fdf78f80163c97c0b52b3fe)
* pytdb: Add support for tdb_enable_seqnum, tdb_get_seqnum and ↵Kirill Smelkov2010-10-071-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> (This used to be ctdb commit 1778fd02eec6e64737167c46173c0c76c85cc4d9)
* pytdb: Update open flags to match those for tdb_open() in tdb.hKirill Smelkov2010-10-071-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> (This used to be ctdb commit d0c28ff1fedd27a99a7550fcc74e18cb1f536986)
* pytdb: Fix repr segfault for internal dbKirill Smelkov2010-10-071-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> (This used to be ctdb commit 3ff413baf04ce28eb54a80141250ae1284b2a521)
* pytdb: Add support for tdb_add_flags() & tdb_remove_flags()Kirill Smelkov2010-10-071-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> (This used to be ctdb commit 7389f8a8a634c2fe0f068831326d92e6bfa0d046)
* tdb: update tdb ABI to use hide_symbols=TrueAndrew Tridgell2010-04-221-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> (Imported from commit 773a8afbba27a5e2e48577100f3ca9873b506615) (This used to be ctdb commit e174dc084f11db0eb239b643affef2c02c711b1c)
* tdb: fix typo in python's Tdb.get() docstringKirill Smelkov2009-12-161-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> (cherry picked from samba commit cfed5f946de0992a594c189ee3c19cf98e59d380) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 76aacdd8e1106f26565e25903091a757b59cd7e2)
* tdb: kill last bits from swigKirill Smelkov2009-12-161-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> (cherry picked from samba commit ecbe5ebd8d1c44a478c613eb1cace0521142d0d3) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 27611d6a0c313732e438cb24c82b9de126e50156)
* s3 build: Remove unused fstat check to fix a bunch of HAVE_FSTAT warnings ↵Stefan Metzmacher2009-12-161-4/+0
| | | | | | | | (cherry picked from samba commit 2c2545d45af9c7479bf032fff1263e102926a495) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit c40d14b1b7ba7c9ae40c0306a2e552504e0f92a6)
* lib/tdb: include replace.h and system/filesys.h in pytdb.cStefan Metzmacher2009-12-161-4/+3
| | | | | | | | | | | This fixes the build on Tru64. metze (cherry picked from samba commit 3718cf294ad1f3e00178cb34b2c914c9aecf2016) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 5652e403be099f35cdd29fda8ba4fe2c35de8035)
* Avoid using a utility header for Python replacements included in Samba, ↵Stefan Metzmacher2009-12-161-1/+5
| | | | | | | | since this will not be shipped with talloc/tdb/tevent/etc. (cherry picked from samba commit ba5d6e6d706ebf07640ee24d701255cbb4803525) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit da47169c4d3bc1b446b49610d892df05638e912c)
* s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 (cherry ↵Stefan Metzmacher2009-12-161-1/+1
| | | | | | | | picked from samba commit 61a23c5eea2203721a70a4ad41bfdc6cd1d6a2a7) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 4130c5dd10869b071124e2bf04d6807bbb11ab1f)
* py: Properly increase the reference counter of Py_None. (cherry picked from ↵Stefan Metzmacher2009-12-161-16/+16
| | | | | | | | samba commit d2c70d24e12293d9b4272eb310a6a4c4582b2d92) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit e7242221c3318a5c312e17ff4074bef80b639ca8)
* Make sure to not close tdb database more than once. (cherry picked from ↵Jelmer Vernooij2009-12-161-2/+10
| | | | | | | | samba commit 6fe6983e4c960abc69d5fa80cbef534ae515209a) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 52f78e040749d24058ee1f575d949b57d15f5987)
* Implement missing functions in pytdb. (cherry picked from samba commit ↵Jelmer Vernooij2009-12-161-2/+62
| | | | | | | | 2da551bbcc6cab296769c193b0b82aaa6256cece) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 3a671b11770057c91e0ae646499d4714f52bc5c0)
* Add simple manually written replacement for the tdb module. (cherry picked ↵Stefan Metzmacher2009-12-161-0/+449
from samba commit 2a61fd41e9d4d2e3d7b47a816544c88bb369bc03) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 2231ee0aa163d68383dd9636f25f033fe7c1f3e7)