From c95c3863dfec8e0160ff3bb217c6922666feed05 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 9 Sep 2010 17:59:40 +1000 Subject: pyldb: expose PyLdbDn_FromDn() This is needed by the dsdb python interface Pair-Programmed-With: Andrew Bartlett --- source4/lib/ldb/pyldb.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'source4/lib/ldb/pyldb.c') diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index b60f4fc3ee..57407ba0b6 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -357,24 +357,6 @@ static PyObject *py_ldb_dn_new(PyTypeObject *type, PyObject *args, PyObject *kwa return (PyObject *)py_ret; } -PyObject *PyLdbDn_FromDn(struct ldb_dn *dn) -{ - PyLdbDnObject *py_ret; - - if (dn == NULL) { - Py_RETURN_NONE; - } - - py_ret = (PyLdbDnObject *)PyLdbDn.tp_alloc(&PyLdbDn, 0); - if (py_ret == NULL) { - PyErr_NoMemory(); - return NULL; - } - py_ret->mem_ctx = talloc_new(NULL); - py_ret->dn = talloc_reference(py_ret->mem_ctx, dn); - return (PyObject *)py_ret; -} - static void py_ldb_dn_dealloc(PyLdbDnObject *self) { talloc_free(self->mem_ctx); -- cgit