return PyBool_FromLong(security_token_has_sid(token, sid));
}
-static PyObject *py_token_is_anonymous(PyObject *self)
+static PyObject *py_token_is_anonymous(PyObject *self,
+ PyObject *Py_UNUSED(ignored))
{
struct security_token *token = pytalloc_get_ptr(self);
return PyBool_FromLong(security_token_is_anonymous(token));
}
-static PyObject *py_token_is_system(PyObject *self)
+static PyObject *py_token_is_system(PyObject *self,
+ PyObject *Py_UNUSED(ignored))
{
struct security_token *token = pytalloc_get_ptr(self);
return PyBool_FromLong(security_token_is_system(token));
}
-static PyObject *py_token_has_builtin_administrators(PyObject *self)
+static PyObject *py_token_has_builtin_administrators(PyObject *self,
+ PyObject *Py_UNUSED(ignored))
{
struct security_token *token = pytalloc_get_ptr(self);
return PyBool_FromLong(security_token_has_builtin_administrators(token));
}
-static PyObject *py_token_has_nt_authenticated_users(PyObject *self)
+static PyObject *py_token_has_nt_authenticated_users(PyObject *self,
+ PyObject *Py_UNUSED(ignored))
{
struct security_token *token = pytalloc_get_ptr(self);
return PyInt_FromLong(sec_privilege_id(name));
}
-static PyObject *py_random_sid(PyObject *self)
+static PyObject *py_random_sid(PyObject *self,
+ PyObject *Py_UNUSED(ignored))
{
struct dom_sid *sid;
PyObject *ret;
#include <Python.h>
#include "python/py3compat.h"
#include "includes.h"
+#include "python/modules.h"
#include <structmember.h>
#include "librpc/rpc/pyrpc.h"
#include "lib/events/events.h"
}
static PyMethodDef dcerpc_interface_methods[] = {
- { "request", (PyCFunction)py_iface_request, METH_VARARGS|METH_KEYWORDS, "S.request(opnum, data, object=None) -> data\nMake a raw request" },
+ { "request", PY_DISCARD_FUNC_SIG(PyCFunction, py_iface_request),
+ METH_VARARGS|METH_KEYWORDS,
+ "S.request(opnum, data, object=None) -> data\n"
+ "Make a raw request" },
{ NULL, NULL, 0, NULL },
};
#include <Python.h>
#include "python/py3compat.h"
#include "includes.h"
+#include "python/modules.h"
#include "librpc/rpc/pyrpc_util.h"
#include "librpc/rpc/dcerpc.h"
#include "librpc/rpc/pyrpc.h"
}
wb->name = discard_const_p(char, mds[i].name);
wb->flags = PyWrapperFlag_KEYWORDS;
- wb->wrapper = (wrapperfunc)py_dcerpc_call_wrapper;
+ wb->wrapper = PY_DISCARD_FUNC_SIG(wrapperfunc,
+ py_dcerpc_call_wrapper);
wb->doc = discard_const_p(char, mds[i].doc);
ret = PyDescr_NewWrapper(ifacetype, wb, discard_const_p(void, &mds[i]));