summaryrefslogtreecommitdiff
path: root/src/_fastmath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/_fastmath.c')
-rw-r--r--src/_fastmath.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/_fastmath.c b/src/_fastmath.c
index 3be1432..afbe931 100644
--- a/src/_fastmath.c
+++ b/src/_fastmath.c
@@ -1682,7 +1682,6 @@ init_fastmath (void)
PyObject *_fastmath_dict;
#ifdef IS_PY3K
- /* PyType_Ready automatically fills in ob_type with &PyType_Type if it's not already set */
if (PyType_Ready(&rsaKeyType) < 0)
return NULL;
if (PyType_Ready(&dsaKeyType) < 0)
@@ -1692,8 +1691,10 @@ init_fastmath (void)
if (_fastmath_module == NULL)
return NULL;
#else
- rsaKeyType.ob_type = &PyType_Type;
- dsaKeyType.ob_type = &PyType_Type;
+ if (PyType_Ready(&rsaKeyType) < 0)
+ return;
+ if (PyType_Ready(&dsaKeyType) < 0)
+ return;
_fastmath_module = Py_InitModule ("_fastmath", _fastmath__methods__);
#endif
_fastmath_dict = PyModule_GetDict (_fastmath_module);