#if defined(HAVE_GETRUSAGE)
PyDoc_STRVAR(resource_getrusage__doc__,
"getrusage($module, who, /)\n"
"--\n"
"\n");
#define RESOURCE_GETRUSAGE_METHODDEF …
static PyObject *
resource_getrusage_impl(PyObject *module, int who);
static PyObject *
resource_getrusage(PyObject *module, PyObject *arg)
{ … }
#endif
PyDoc_STRVAR(resource_getrlimit__doc__,
"getrlimit($module, resource, /)\n"
"--\n"
"\n");
#define RESOURCE_GETRLIMIT_METHODDEF …
static PyObject *
resource_getrlimit_impl(PyObject *module, int resource);
static PyObject *
resource_getrlimit(PyObject *module, PyObject *arg)
{ … }
PyDoc_STRVAR(resource_setrlimit__doc__,
"setrlimit($module, resource, limits, /)\n"
"--\n"
"\n");
#define RESOURCE_SETRLIMIT_METHODDEF …
static PyObject *
resource_setrlimit_impl(PyObject *module, int resource, PyObject *limits);
static PyObject *
resource_setrlimit(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{ … }
#if defined(HAVE_PRLIMIT)
PyDoc_STRVAR(resource_prlimit__doc__,
"prlimit($module, pid, resource, limits=None, /)\n"
"--\n"
"\n");
#define RESOURCE_PRLIMIT_METHODDEF …
static PyObject *
resource_prlimit_impl(PyObject *module, pid_t pid, int resource,
PyObject *limits);
static PyObject *
resource_prlimit(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{ … }
#endif
PyDoc_STRVAR(resource_getpagesize__doc__,
"getpagesize($module, /)\n"
"--\n"
"\n");
#define RESOURCE_GETPAGESIZE_METHODDEF …
static int
resource_getpagesize_impl(PyObject *module);
static PyObject *
resource_getpagesize(PyObject *module, PyObject *Py_UNUSED(ignored))
{ … }
#ifndef RESOURCE_GETRUSAGE_METHODDEF
#define RESOURCE_GETRUSAGE_METHODDEF
#endif
#ifndef RESOURCE_PRLIMIT_METHODDEF
#define RESOURCE_PRLIMIT_METHODDEF
#endif