summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/pyldb_util.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-07-18 16:11:21 +0200
committerJelmer Vernooij <jelmer@samba.org>2009-07-18 16:11:21 +0200
commitd356669492912ad97d031694123b628a9307c3bd (patch)
tree86f1e6d34980ef39c4d56b9e719195480b11817e /source4/lib/ldb/pyldb_util.c
parent8c5aff207d25764dd457050c2e5975b4b42c917f (diff)
downloadsamba-d356669492912ad97d031694123b628a9307c3bd.tar.gz
samba-d356669492912ad97d031694123b628a9307c3bd.tar.bz2
samba-d356669492912ad97d031694123b628a9307c3bd.zip
Remove pyldb_util and simply duplicate the 5-line function it contains,
rather than creating a separate shared library for it.
Diffstat (limited to 'source4/lib/ldb/pyldb_util.c')
-rw-r--r--source4/lib/ldb/pyldb_util.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/source4/lib/ldb/pyldb_util.c b/source4/lib/ldb/pyldb_util.c
deleted file mode 100644
index 84183e89de..0000000000
--- a/source4/lib/ldb/pyldb_util.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- interface to ldb.
-
- Copyright (C) 2009 Jelmer Vernooij <jelmer@samba.org>
-
- ** NOTE! The following LGPL license applies to the ldb
- ** library. This does NOT imply that all of Samba is released
- ** under the LGPL
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 3 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "replace.h"
-#include <Python.h>
-#include "pyldb.h"
-#include <ldb.h>
-
-void PyErr_SetLdbError(PyObject *error, int ret, struct ldb_context *ldb_ctx)
-{
- if (ret == LDB_ERR_PYTHON_EXCEPTION)
- return; /* Python exception should already be set, just keep that */
-
- PyErr_SetObject(error,
- Py_BuildValue(discard_const_p(char, "(i,s)"), ret,
- ldb_ctx == NULL?ldb_strerror(ret):ldb_errstring(ldb_ctx)));
-}