diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2006-10-13 17:18:28 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2006-10-13 17:18:28 +0000 |
commit | 45f9558ec55e04a214b1e259fb0a73ed08c1bd9f (patch) | |
tree | 884c2fed04baf4cbbbdd606eb7f28df0db667a88 /numpy/f2py/lib/py_wrap.py | |
parent | 4a69a27cf3edc60a1304110e5b9bf4090b8c6ec5 (diff) | |
download | numpy-45f9558ec55e04a214b1e259fb0a73ed08c1bd9f.tar.gz |
F2PY G3: exposing f90 type information via _API variable for other modules.
Diffstat (limited to 'numpy/f2py/lib/py_wrap.py')
-rw-r--r-- | numpy/f2py/lib/py_wrap.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/numpy/f2py/lib/py_wrap.py b/numpy/f2py/lib/py_wrap.py index e4dc82786..b35e4452c 100644 --- a/numpy/f2py/lib/py_wrap.py +++ b/numpy/f2py/lib/py_wrap.py @@ -43,11 +43,17 @@ static PyMethodDef f2py_module_methods[] = { PyMODINIT_FUNC init%(modulename)s(void) { f2py_module = Py_InitModule("%(modulename)s", f2py_module_methods); import_array(); - %(module_init_list)s if (PyErr_Occurred()) { - PyErr_SetString(PyExc_ImportError, "can\'t initialize module %(modulename)s"); + PyErr_SetString(PyExc_ImportError, "failed to load array module."); return; } + %(module_init_list)s + return; +capi_err: + if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_RuntimeError, "failed to initialize %(modulename)s module."); + } + return; } #ifdef __cplusplus } |