Skip to content

Commit c8e2216

Browse files
ngoldbaumcharris
authored andcommitted
BUG: call PyType_Ready in f2py to avoid data races
1 parent 46880b7 commit c8e2216

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

numpy/f2py/rules.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@
245245
if (! PyErr_Occurred())
246246
on_exit(f2py_report_on_exit,(void*)\"#modulename#\");
247247
#endif
248+
249+
if (PyType_Ready(&PyFortran_Type) < 0) {
250+
return NULL;
251+
}
252+
248253
return m;
249254
}
250255
#ifdef __cplusplus

0 commit comments

Comments
 (0)