typedef struct ldb_ldif ldb_ldif;
typedef struct ldb_message_element ldb_msg_element;
typedef int ldb_error;
+typedef int ldb_int_error;
%}
%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;
}
%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 *);