diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-14 05:16:51 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-14 19:53:06 +0100 |
commit | 3b16c532f21202696d54ef87f8fa74d066812898 (patch) | |
tree | efe40b4053cc286332387545ccb4ef8a1d42802f /source4/param | |
parent | da72bff5b72658c6cfb1980ac97475ebbc21b6f5 (diff) | |
download | samba-3b16c532f21202696d54ef87f8fa74d066812898.tar.gz samba-3b16c532f21202696d54ef87f8fa74d066812898.tar.bz2 samba-3b16c532f21202696d54ef87f8fa74d066812898.zip |
pidl/python: Pass credentials and loadparm context when connecting using DCE/RPC.
(This used to be commit 4c87af95310e4aaee3f2e2da02d0ea70ed1ec25b)
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/param.i | 12 | ||||
-rw-r--r-- | source4/param/param_wrap.c | 11 |
2 files changed, 23 insertions, 0 deletions
diff --git a/source4/param/param.i b/source4/param/param.i index 353fa3ced6..fdc9de233f 100644 --- a/source4/param/param.i +++ b/source4/param/param.i @@ -290,3 +290,15 @@ typedef struct param_section { %rename(default_config) global_loadparm; struct loadparm_context *global_loadparm; + +%{ + +struct loadparm_context *lp_from_py_object(PyObject *py_obj) +{ + struct loadparm_context *lp_ctx; + if (SWIG_ConvertPtr(py_obj, &lp_ctx, SWIGTYPE_p_loadparm_context, 0 | 0 ) < 0) + return NULL; + return lp_ctx; +} + +%} diff --git a/source4/param/param_wrap.c b/source4/param/param_wrap.c index ca9fbb77b8..e9fe8a3df5 100644 --- a/source4/param/param_wrap.c +++ b/source4/param/param_wrap.c @@ -2760,6 +2760,17 @@ SWIGINTERN char const *param_opt___str__(param_opt *self){ return self->value; } SWIGINTERN void delete_param_opt(param_opt *self){ talloc_free(self); } SWIGINTERN struct param_opt *param_section_first_parameter(param_section *self){ return self->parameters; } SWIGINTERN struct param_opt *param_section_next_parameter(param_section *self,struct param_opt *s){ return s->next; } + + +struct loadparm_context *lp_from_py_object(PyObject *py_obj) +{ + struct loadparm_context *lp_ctx; + if (SWIG_ConvertPtr(py_obj, &lp_ctx, SWIGTYPE_p_loadparm_context, 0 | 0 ) < 0) + return NULL; + return lp_ctx; +} + + #ifdef __cplusplus extern "C" { #endif |