mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
Add utility function for getting the default loadparm context from a python module.
This commit is contained in:
parent
ef915eff16
commit
e11a7b3a0b
@ -344,4 +344,13 @@ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
|
||||
return lp_ctx;
|
||||
}
|
||||
|
||||
struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
struct loadparm_context *ret;
|
||||
ret = loadparm_init(mem_ctx);
|
||||
if (!lp_load_default(ret))
|
||||
return NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
%}
|
||||
|
@ -2814,6 +2814,15 @@ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
|
||||
return lp_ctx;
|
||||
}
|
||||
|
||||
struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
struct loadparm_context *ret;
|
||||
ret = loadparm_init(mem_ctx);
|
||||
if (!lp_load_default(ret))
|
||||
return NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user