#include <Python.h>
#include "python/py3compat.h"
#include "includes.h"
+#include "python/modules.h"
#include "pycredentials.h"
#include "param/param.h"
#include "lib/cmdline/credentials.h"
},
{
.ml_name = "get_ntlm_response",
- .ml_meth = (PyCFunction)py_creds_get_ntlm_response,
+ .ml_meth = PY_DISCARD_FUNC_SIG(PyCFunction,
+ py_creds_get_ntlm_response),
.ml_flags = METH_VARARGS | METH_KEYWORDS,
.ml_doc = "S.get_ntlm_response"
"(flags, challenge[, target_info]) -> "
}
static PyMethodDef py_nbt_methods[] = {
- { "query_name", (PyCFunction)py_nbt_name_query, METH_VARARGS|METH_KEYWORDS,
+ { "query_name", PY_DISCARD_FUNC_SIG(PyCFunction, py_nbt_name_query),
+ METH_VARARGS|METH_KEYWORDS,
"S.query_name(name, dest, broadcast=True, wins=False, timeout=0, retries=3) -> (reply_from, name, reply_addr)\n"
"Query for a NetBIOS name" },
- { "register_name", (PyCFunction)py_nbt_name_register, METH_VARARGS|METH_KEYWORDS,
+ { "register_name", PY_DISCARD_FUNC_SIG(PyCFunction,
+ py_nbt_name_register),
+ METH_VARARGS|METH_KEYWORDS,
"S.register_name(name, address, dest, register_demand=True, broadcast=True, multi_homed=True, ttl=0, timeout=0, retries=0) -> (reply_from, name, reply_addr, rcode)\n"
"Register a new name" },
- { "release_name", (PyCFunction)py_nbt_name_release, METH_VARARGS|METH_KEYWORDS, "S.release_name(name, address, dest, nb_flags=0, broadcast=true, timeout=0, retries=3) -> (reply_from, name, reply_addr, rcode)\n"
+ { "release_name", PY_DISCARD_FUNC_SIG(PyCFunction, py_nbt_name_release),
+ METH_VARARGS|METH_KEYWORDS, "S.release_name(name, address, dest, nb_flags=0, broadcast=true, timeout=0, retries=3) -> (reply_from, name, reply_addr, rcode)\n"
"release a previously registered name" },
- { "refresh_name", (PyCFunction)py_nbt_name_refresh, METH_VARARGS|METH_KEYWORDS, "S.refresh_name(name, address, dest, nb_flags=0, broadcast=True, ttl=0, timeout=0, retries=0) -> (reply_from, name, reply_addr, rcode)\n"
+ { "refresh_name", PY_DISCARD_FUNC_SIG(PyCFunction, py_nbt_name_refresh),
+ METH_VARARGS|METH_KEYWORDS, "S.refresh_name(name, address, dest, nb_flags=0, broadcast=True, ttl=0, timeout=0, retries=0) -> (reply_from, name, reply_addr, rcode)\n"
"release a previously registered name" },
- { "name_status", (PyCFunction)py_nbt_name_status, METH_VARARGS|METH_KEYWORDS,
+ { "name_status", PY_DISCARD_FUNC_SIG(PyCFunction, py_nbt_name_status),
+ METH_VARARGS|METH_KEYWORDS,
"S.name_status(name, dest, timeout=0, retries=0) -> (reply_from, name, status)\n"
"Find the status of a name" },
#include <Python.h>
#include "python/py3compat.h"
#include "includes.h"
+#include "python/modules.h"
#include "libcli/util/pyerrors.h"
#include "libcli/security/security.h"
#include "pytalloc.h"
}
static PyMethodDef py_security_methods[] = {
- { "access_check", (PyCFunction)py_se_access_check, METH_VARARGS|METH_KEYWORDS,
+ { "access_check", PY_DISCARD_FUNC_SIG(PyCFunction,
+ py_se_access_check),
+ METH_VARARGS|METH_KEYWORDS,
"access_check(security_descriptor, token, access_desired) -> access_granted. Raises NT_STATUS on error, including on access check failure, returns access granted bitmask"},
{ NULL },
};
#include "auth/credentials/pycredentials.h"
#include "libcli/util/pyerrors.h"
#include "python/py3compat.h"
+#include "python/modules.h"
/* A Python C API module to use LIBGPO */
}
static PyMethodDef GPO_methods[] = {
- {"get_unix_path", (PyCFunction)py_gpo_get_unix_path, METH_KEYWORDS,
+ {"get_unix_path", PY_DISCARD_FUNC_SIG(PyCFunction,
+ py_gpo_get_unix_path),
+ METH_KEYWORDS,
NULL },
{NULL}
};
Py_TYPE(self)->tp_free((PyObject*)self);
}
-static PyObject* py_ads_connect(ADS *self);
+static PyObject* py_ads_connect(ADS *self, PyObject *Py_UNUSED(ignored));
static int py_ads_init(ADS *self, PyObject *args, PyObject *kwds)
{
const char *realm = NULL;
}
/* connect. Failure to connect results in an Exception */
-static PyObject* py_ads_connect(ADS *self)
+static PyObject* py_ads_connect(ADS *self,
+ PyObject *Py_UNUSED(ignored))
{
ADS_STATUS status;
TALLOC_CTX *frame = talloc_stackframe();
{ "connect", (PyCFunction)py_ads_connect, METH_NOARGS,
"Connect to the LDAP server" },
#ifdef HAVE_ADS
- { "get_gpo_list", (PyCFunction)py_ads_get_gpo_list, METH_VARARGS | METH_KEYWORDS,
+ { "get_gpo_list", PY_DISCARD_FUNC_SIG(PyCFunction, py_ads_get_gpo_list),
+ METH_VARARGS | METH_KEYWORDS,
NULL },
#endif
{ NULL }
Py_RETURN_NONE;
}
-static PyObject *py_get_debug_level(PyObject *self)
+static PyObject *py_get_debug_level(PyObject *self,
+ PyObject *Py_UNUSED(ignored))
{
return PyInt_FromLong(debuglevel_get());
}
-static PyObject *py_fault_setup(PyObject *self)
+static PyObject *py_fault_setup(PyObject *self,
+ PyObject *Py_UNUSED(ignored))
{
static bool done;
if (!done) {
Py_RETURN_NONE;
}
-static PyObject *py_is_ntvfs_fileserver_built(PyObject *self)
+static PyObject *py_is_ntvfs_fileserver_built(PyObject *self,
+ PyObject *Py_UNUSED(ignored))
{
#ifdef WITH_NTVFS_FILESERVER
Py_RETURN_TRUE;
#endif
}
-static PyObject *py_is_heimdal_built(PyObject *self)
+static PyObject *py_is_heimdal_built(PyObject *self,
+ PyObject *Py_UNUSED(ignored))
{
#ifdef SAMBA4_USES_HEIMDAL
Py_RETURN_TRUE;