mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
Add python binding for DATADIR build path
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
97a8f99946
commit
e32f4602ed
@ -614,6 +614,11 @@ PyTypeObject PyLoadparmService = {
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
};
|
||||
|
||||
static PyObject *py_data_dir(PyObject *self)
|
||||
{
|
||||
return PyUnicode_FromString(dyn_DATADIR);
|
||||
}
|
||||
|
||||
static PyObject *py_default_path(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return PyUnicode_FromString(lp_default_path());
|
||||
@ -640,6 +645,8 @@ static PyObject *py_sbin_dir(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
}
|
||||
|
||||
static PyMethodDef pyparam_methods[] = {
|
||||
{ "data_dir", (PyCFunction)py_data_dir, METH_NOARGS,
|
||||
"Returns the compiled in location of data directory." },
|
||||
{ "default_path", (PyCFunction)py_default_path, METH_NOARGS,
|
||||
"Returns the default smb.conf path." },
|
||||
{ "setup_dir", (PyCFunction)py_setup_dir, METH_NOARGS,
|
||||
|
Loading…
Reference in New Issue
Block a user