8000 Merge pull request #28133 from ngoldbaum/f2py-pytype-ready · melissawm/numpy@709e40e · GitHub
[go: up one dir, main page]

Skip to content

Commit 709e40e

Browse files
authored
Merge pull request numpy#28133 from ngoldbaum/f2py-pytype-ready
BUG: call PyType_Ready in f2py to avoid data races
2 parents 7f93cf4 + 41537b6 commit 709e40e
Copy full SHA for 709e40e

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)
0