mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
python3 port for smbd module
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
25e336ebbf
commit
53e76ed2ff
@ -25,6 +25,7 @@
|
||||
|
||||
#include <Python.h>
|
||||
#include "includes.h"
|
||||
#include "python/py3compat.h"
|
||||
#include "smbd/smbd.h"
|
||||
#include "libcli/util/pyerrors.h"
|
||||
#include "librpc/rpc/pyrpc_util.h"
|
||||
@ -739,13 +740,19 @@ static PyMethodDef py_smbd_methods[] = {
|
||||
};
|
||||
|
||||
void initsmbd(void);
|
||||
void initsmbd(void)
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
.m_name = "smbd",
|
||||
.m_doc = "Python bindings for the smbd file server.",
|
||||
.m_size = -1,
|
||||
.m_methods = py_smbd_methods,
|
||||
};
|
||||
|
||||
MODULE_INIT_FUNC(smbd)
|
||||
{
|
||||
PyObject *m;
|
||||
|
||||
m = Py_InitModule3("smbd", py_smbd_methods,
|
||||
"Python bindings for the smbd file server.");
|
||||
if (m == NULL)
|
||||
return;
|
||||
PyObject *m = NULL;
|
||||
|
||||
m = PyModule_Create(&moduledef);
|
||||
return m;
|
||||
}
|
||||
|
@ -1296,7 +1296,9 @@ bld.SAMBA3_BINARY('vlp',
|
||||
''',
|
||||
install=False)
|
||||
|
||||
bld.SAMBA3_PYTHON('pysmbd',
|
||||
|
||||
for env in bld.gen_python_environments():
|
||||
bld.SAMBA3_PYTHON('pysmbd',
|
||||
source='smbd/pysmbd.c',
|
||||
deps='smbd_base pyrpc_util pytalloc-util',
|
||||
realname='samba/samba3/smbd.so'
|
||||
|
Loading…
Reference in New Issue
Block a user