summaryrefslogtreecommitdiff
path: root/source4/param/pyparam.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-04-23 01:20:20 +0200
committerJelmer Vernooij <jelmer@samba.org>2009-06-02 18:05:40 +0200
commitfe2b04b4bba6585ee5377d44b8e2627d32d404c4 (patch)
tree9678f5ef13287202e8bfb924dd5ed50df59b5679 /source4/param/pyparam.c
parent42fa7ec8236fcacdc02a7f3f275cbe01791df43d (diff)
downloadsamba-fe2b04b4bba6585ee5377d44b8e2627d32d404c4.tar.gz
samba-fe2b04b4bba6585ee5377d44b8e2627d32d404c4.tar.bz2
samba-fe2b04b4bba6585ee5377d44b8e2627d32d404c4.zip
python: Move helper functions for using param into a separate file rather
than linking against the python module.
Diffstat (limited to 'source4/param/pyparam.c')
-rw-r--r--source4/param/pyparam.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index efaedf7b41..e32cfa0523 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -325,30 +325,6 @@ PyTypeObject PyLoadparmService = {
.tp_flags = Py_TPFLAGS_DEFAULT,
};
-_PUBLIC_ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
-{
- struct loadparm_context *lp_ctx;
- if (PyString_Check(py_obj)) {
- lp_ctx = loadparm_init(NULL);
- if (!lp_load(lp_ctx, PyString_AsString(py_obj))) {
- talloc_free(lp_ctx);
- PyErr_Format(PyExc_RuntimeError,
- "Unable to load %s", PyString_AsString(py_obj));
- return NULL;
- }
- return lp_ctx;
- }
-
- if (py_obj == Py_None) {
- lp_ctx = loadparm_init(NULL);
- /* We're not checking that loading the file succeeded *on purpose */
- lp_load_default(lp_ctx);
- return lp_ctx;
- }
-
- return PyLoadparmContext_AsLoadparmContext(py_obj);
-}
-
struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx)
{
struct loadparm_context *ret;