summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2006-01-24 11:18:11 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2006-01-24 11:18:11 +0000
commit4c7ad57fc7503e50351b0139be396e3d7f38b7ab (patch)
tree681a1aea312db389a1e298b23768cfd23358ac32
parent1b3333b52a242dff187c0254eba2cf9b1c182bb1 (diff)
downloadnumpy-4c7ad57fc7503e50351b0139be396e3d7f38b7ab.tar.gz
Instead of Fatal error in f2py ext.modules let Python handle raising an exception.
-rw-r--r--numpy/f2py/rules.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py
index b72334343..f47e5d44f 100644
--- a/numpy/f2py/rules.py
+++ b/numpy/f2py/rules.py
@@ -167,7 +167,7 @@ static PyMethodDef f2py_module_methods[] = {
\t{NULL,NULL}
};
-DL_EXPORT(void) init#modulename#(void) {
+DL_EXPORT(int) init#modulename#(void) {
\tint i;
\tPyObject *m,*d, *s;
\tm = #modulename#_module = Py_InitModule(\"#modulename#\", f2py_module_methods);
@@ -189,7 +189,7 @@ DL_EXPORT(void) init#modulename#(void) {
#initcommonhooks#
#interface_usercode#
\tif (PyErr_Occurred())
-\t\tPy_FatalError(\"can't initialize module #modulename#\");
+\t\treturn -1;
#ifdef F2PY_REPORT_ATEXIT
\ton_exit(f2py_report_on_exit,(void*)\"#modulename#\");