From 41cdac9c3e5b2e9eea3067892a3e60b4bff67154 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 31 May 2010 20:44:12 +0200 Subject: pyldb: Remove duplicate copy of function. --- source4/lib/ldb/pyldb.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index ce149ccd95..fd7584dc6c 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -80,34 +80,6 @@ static PyObject *PyObject_FromLdbValue(struct ldb_context *ldb_ctx, return ret; } -/** - * Obtain a ldb DN from a Python object. - * - * @param mem_ctx Memory context - * @param object Python object - * @param ldb_ctx LDB context - * @return Whether or not the conversion succeeded - */ -bool PyObject_AsDn(TALLOC_CTX *mem_ctx, PyObject *object, - struct ldb_context *ldb_ctx, struct ldb_dn **dn) -{ - struct ldb_dn *odn; - - if (ldb_ctx != NULL && PyString_Check(object)) { - odn = ldb_dn_new(mem_ctx, ldb_ctx, PyString_AsString(object)); - *dn = odn; - return true; - } - - if (PyLdbDn_Check(object)) { - *dn = PyLdbDn_AsDn(object); - return true; - } - - PyErr_SetString(PyExc_TypeError, "Expected DN"); - return false; -} - /** * Create a Python object from a ldb_result. * -- cgit