uint32_t state[N];
} RandomObject;
+#define RandomObject_CAST(op) ((RandomObject *)(op))
#include "clinic/_randommodule.c.h"
}
static int
-random_init(RandomObject *self, PyObject *args, PyObject *kwds)
+random_init(PyObject *self, PyObject *args, PyObject *kwds)
{
PyObject *arg = NULL;
_randomstate *state = _randomstate_type(Py_TYPE(self));
if (PyTuple_GET_SIZE(args) == 1)
arg = PyTuple_GET_ITEM(args, 0);
- return random_seed(self, arg);
+ return random_seed(RandomObject_CAST(self), arg);
}
static void
_random_free(void *module)
{
- _random_clear((PyObject *)module);
+ (void)_random_clear((PyObject *)module);
}
static struct PyModuleDef _randommodule = {