svn commit: samba r26055 - in branches/4.0-python: . source/lib/ldb
source/lib/ldb/tests/python
jelmer at samba.org
jelmer at samba.org
Tue Nov 20 11:40:27 GMT 2007
Author: jelmer
Date: 2007-11-20 11:40:26 +0000 (Tue, 20 Nov 2007)
New Revision: 26055
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26055
Log:
Support get/set opaque
Modified:
branches/4.0-python/
branches/4.0-python/source/lib/ldb/ldb.i
branches/4.0-python/source/lib/ldb/tests/python/api.py
Changeset:
Property changes on: branches/4.0-python
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/4.0-python/source/lib/ldb/ldb.i
===================================================================
--- branches/4.0-python/source/lib/ldb/ldb.i 2007-11-20 11:08:33 UTC (rev 26054)
+++ branches/4.0-python/source/lib/ldb/ldb.i 2007-11-20 11:40:26 UTC (rev 26055)
@@ -511,6 +511,8 @@
ldb_error set_debug(void (*debug)(void *context, enum ldb_debug_level level,
const char *fmt, va_list ap),
void *context);
+ ldb_error set_opaque(const char *name, void *value);
+ void *get_opaque(const char *name);
ldb_error transaction_start();
ldb_error transaction_commit();
ldb_error transaction_cancel();
Modified: branches/4.0-python/source/lib/ldb/tests/python/api.py
===================================================================
--- branches/4.0-python/source/lib/ldb/tests/python/api.py 2007-11-20 11:08:33 UTC (rev 26054)
+++ branches/4.0-python/source/lib/ldb/tests/python/api.py 2007-11-20 11:40:26 UTC (rev 26055)
@@ -49,6 +49,12 @@
l = ldb.Ldb("foo.tdb")
self.assertEquals(len(l.search(ldb.Dn(l, ""), ldb.SCOPE_SUBTREE, "(dc=*)", ["dc"])), 0)
+ def test_opaque(self):
+ l = ldb.Ldb("foo.tdb")
+ l.set_opaque("my_opaque", l)
+ self.assertTrue(l.get_opaque("my_opaque") is not None)
+ self.assertEquals(None, l.get_opaque("unknown"))
+
def test_search_scope_base(self):
l = ldb.Ldb("foo.tdb")
self.assertEquals(len(l.search(ldb.Dn(l, "dc=foo"),
More information about the samba-cvs
mailing list