summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb.i
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-03-04 14:16:57 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-03-04 14:16:57 +0100
commit5a5b50f3dd7d75214184f711c35a7536b64cbbe7 (patch)
tree489fa463e4e8a49aa485f4904fd8e7254206070d /source4/lib/ldb/ldb.i
parentf4f6f849402488e150e9c759e57bfced6e9dfaf0 (diff)
parent3ced8006a6a58b459fd68e9b02d7673b16b2df95 (diff)
downloadsamba-5a5b50f3dd7d75214184f711c35a7536b64cbbe7.tar.gz
samba-5a5b50f3dd7d75214184f711c35a7536b64cbbe7.tar.bz2
samba-5a5b50f3dd7d75214184f711c35a7536b64cbbe7.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts: source/build/smb_build/makefile.pm (This used to be commit 391fea450b2e6664fcd4e4419858997c6094cf3e)
Diffstat (limited to 'source4/lib/ldb/ldb.i')
-rw-r--r--source4/lib/ldb/ldb.i11
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/lib/ldb/ldb.i b/source4/lib/ldb/ldb.i
index da4c52f778..0d9679d21e 100644
--- a/source4/lib/ldb/ldb.i
+++ b/source4/lib/ldb/ldb.i
@@ -42,6 +42,7 @@ typedef struct ldb_dn ldb_dn;
typedef struct ldb_ldif ldb_ldif;
typedef struct ldb_message_element ldb_msg_element;
typedef int ldb_error;
+typedef int ldb_int_error;
%}
@@ -521,6 +522,14 @@ PyObject *PyExc_LdbError;
%typemap(out,noblock=1) ldb_error {
if ($1 != LDB_SUCCESS) {
+ PyErr_SetObject(PyExc_LdbError, Py_BuildValue((char *)"(i,s)", $1, ldb_errstring(arg1)));
+ SWIG_fail;
+ }
+ $result = Py_None;
+};
+
+%typemap(out,noblock=1) ldb_int_error {
+ if ($1 != LDB_SUCCESS) {
PyErr_SetObject(PyExc_LdbError, Py_BuildValue((char *)"(i,s)", $1, ldb_strerror($1)));
SWIG_fail;
}
@@ -761,4 +770,4 @@ time_t ldb_string_to_time(const char *s);
}
%rename(register_module) ldb_register_module;
-ldb_error ldb_register_module(const struct ldb_module_ops *);
+ldb_int_error ldb_register_module(const struct ldb_module_ops *);