diff options
Diffstat (limited to 'source4/scripting/swig')
-rw-r--r-- | source4/scripting/swig/ldb.i | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source4/scripting/swig/ldb.i b/source4/scripting/swig/ldb.i index f7c3b5d709..12053d6ac9 100644 --- a/source4/scripting/swig/ldb.i +++ b/source4/scripting/swig/ldb.i @@ -113,12 +113,23 @@ enum ldb_scope {LDB_SCOPE_DEFAULT=-1, resultobj = PyList_New((*$1)->count); for (i = 0; i < (*$1)->count; i++) { - PyList_SetItem(resultobj, i, SWIG_NewPointerObj(*$1, SWIGTYPE_p_ldb_message, 0)); + PyList_SetItem(resultobj, i, SWIG_NewPointerObj((*$1)->msgs[i], SWIGTYPE_p_ldb_message, 0)); } } %types(struct ldb_result *); +%typemap(out) struct ldb_dn * { + $result = PyString_FromString(ldb_dn_linearize($1, $1)); +} + +struct ldb_message_element { + unsigned int flags; + const char *name; + unsigned int num_values; + struct ldb_val *values; +}; + struct ldb_message { struct ldb_dn *dn; unsigned int num_elements; |