summaryrefslogtreecommitdiffstats
path: root/Modules/_randommodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_randommodule.c')
-rw-r--r--Modules/_randommodule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 99be69c..cae49a0 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -67,6 +67,7 @@
/* ---------------------------------------------------------------*/
#include "Python.h"
+#include "pycore_moduleobject.h" // _PyModule_GetState()
#ifdef HAVE_PROCESS_H
# include <process.h> // getpid()
#endif
@@ -86,7 +87,7 @@ typedef struct {
static inline _randomstate*
get_random_state(PyObject *module)
{
- void *state = PyModule_GetState(module);
+ void *state = _PyModule_GetState(module);
assert(state != NULL);
return (_randomstate *)state;
}
@@ -538,7 +539,7 @@ random_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (PyTuple_GET_SIZE(args) == 1)
arg = PyTuple_GET_ITEM(args, 0);
-
+
tmp = random_seed(self, arg);
if (tmp == NULL) {
Py_DECREF(self);