summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-20 23:38:30 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-20 23:38:30 +0100
commit13fa639a29a3e79d825a9b75ac507285e39ff364 (patch)
tree3d6d2f9797e7a8c6fbfc7298c3c3c2dd11413e4e /source4/param
parent0d585a67ed469a0657ae8c40098f5b862e8e4084 (diff)
downloadsamba-13fa639a29a3e79d825a9b75ac507285e39ff364.tar.gz
samba-13fa639a29a3e79d825a9b75ac507285e39ff364.tar.bz2
samba-13fa639a29a3e79d825a9b75ac507285e39ff364.zip
Use plain C implementation for misc Python module rather than SWIG.
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/param.i3
-rw-r--r--source4/param/param.py1
-rw-r--r--source4/param/param_wrap.c45
3 files changed, 49 insertions, 0 deletions
diff --git a/source4/param/param.i b/source4/param/param.i
index c085ca2f05..06579f9b26 100644
--- a/source4/param/param.i
+++ b/source4/param/param.i
@@ -354,3 +354,6 @@ struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx)
}
%}
+
+char *private_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
+ const char *name);
diff --git a/source4/param/param.py b/source4/param/param.py
index 8b68e7a9b3..5c455671f9 100644
--- a/source4/param/param.py
+++ b/source4/param/param.py
@@ -262,5 +262,6 @@ param_section.next_parameter = new_instancemethod(_param.param_section_next_para
param_section_swigregister = _param.param_section_swigregister
param_section_swigregister(param_section)
+private_path = _param.private_path
diff --git a/source4/param/param_wrap.c b/source4/param/param_wrap.c
index 8f4f529532..2849950f7a 100644
--- a/source4/param/param_wrap.c
+++ b/source4/param/param_wrap.c
@@ -4153,6 +4153,50 @@ SWIGINTERN PyObject *param_section_swiginit(PyObject *SWIGUNUSEDPARM(self), PyOb
return SWIG_Python_InitShadowInstance(args);
}
+SWIGINTERN PyObject *_wrap_private_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj = 0;
+ TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
+ struct loadparm_context *arg2 = (struct loadparm_context *) 0 ;
+ char *arg3 = (char *) 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ char * kwnames[] = {
+ (char *) "lp_ctx",(char *) "name", NULL
+ };
+ char *result = 0 ;
+
+ arg2 = loadparm_init(NULL);
+ arg1 = NULL;
+ if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:private_path",kwnames,&obj0,&obj1)) SWIG_fail;
+ if (obj0) {
+ res2 = SWIG_ConvertPtr(obj0, &argp2,SWIGTYPE_p_loadparm_context, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "private_path" "', argument " "2"" of type '" "struct loadparm_context *""'");
+ }
+ arg2 = (struct loadparm_context *)(argp2);
+ }
+ if (obj1) {
+ res3 = SWIG_AsCharPtrAndSize(obj1, &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "private_path" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = (char *)(buf3);
+ }
+ result = (char *)private_path(arg1,arg2,(char const *)arg3);
+ resultobj = SWIG_FromCharPtr((const char *)result);
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+ return resultobj;
+fail:
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+ return NULL;
+}
+
+
static PyMethodDef SwigMethods[] = {
{ (char *)"new_LoadParm", (PyCFunction)_wrap_new_LoadParm, METH_NOARGS, NULL},
{ (char *)"LoadParm_default_service", (PyCFunction) _wrap_LoadParm_default_service, METH_VARARGS | METH_KEYWORDS, NULL},
@@ -4230,6 +4274,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"delete_param_section", (PyCFunction)_wrap_delete_param_section, METH_O, NULL},
{ (char *)"param_section_swigregister", param_section_swigregister, METH_VARARGS, NULL},
{ (char *)"param_section_swiginit", param_section_swiginit, METH_VARARGS, NULL},
+ { (char *)"private_path", (PyCFunction) _wrap_private_path, METH_VARARGS | METH_KEYWORDS, NULL},
{ NULL, NULL, 0, NULL }
};