summaryrefslogtreecommitdiff
path: root/src/winrand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/winrand.c')
-rw-r--r--src/winrand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/winrand.c b/src/winrand.c
index 149ae5c..09dcf75 100644
--- a/src/winrand.c
+++ b/src/winrand.c
@@ -285,7 +285,6 @@ initwinrandom()
{
PyObject *m;
#ifdef IS_PY3K
- /* PyType_Ready automatically fills in ob_type with &PyType_Type if it's not already set */
if (PyType_Ready(&WRtype) < 0)
return NULL;
/* Initialize the module */
@@ -293,7 +292,8 @@ initwinrandom()
if (m == NULL)
return NULL;
#else
- WRtype.ob_type = &PyType_Type;
+ if (PyType_Ready(&WRtype) < 0)
+ return NULL;
m = Py_InitModule("winrandom", WR_mod_methods);
#endif