1
0
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:
Jelmer Vernooij 2008-11-02 16:48:48 +01:00
parent ef915eff16
commit e11a7b3a0b
2 changed files with 18 additions and 0 deletions

View File

@ -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;
}
%}

View File

@ -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" {