summaryrefslogtreecommitdiff
path: root/numpy/f2py/lib/py_wrap.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2006-10-05 16:44:52 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2006-10-05 16:44:52 +0000
commitf0bfc449991703abef349b844764dc3f3abc9fef (patch)
tree7a182c17dc42649c1c610e62ec5f8a574275e9a1 /numpy/f2py/lib/py_wrap.py
parent73eef3a9fc78c6f047af91eb6f86b8e3b7893240 (diff)
downloadnumpy-f0bfc449991703abef349b844764dc3f3abc9fef.tar.gz
F2PY G3: added basic support for wrapping Fortran subprograms, scalar input only.
Diffstat (limited to 'numpy/f2py/lib/py_wrap.py')
-rw-r--r--numpy/f2py/lib/py_wrap.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/numpy/f2py/lib/py_wrap.py b/numpy/f2py/lib/py_wrap.py
index f407e13f4..695057746 100644
--- a/numpy/f2py/lib/py_wrap.py
+++ b/numpy/f2py/lib/py_wrap.py
@@ -55,12 +55,13 @@ PyMODINIT_FUNC init%(modulename)s(void) {
'''
main_fortran_template = '''\
-! -*- f90 -*-
%(fortran_code_list)s
'''
def __init__(self, modulename):
WrapperBase.__init__(self)
self.modulename = modulename
+ self.cname = 'f2py_' + modulename
+
self.header_list = []
self.typedef_list = []
@@ -91,10 +92,8 @@ PyMODINIT_FUNC init%(modulename)s(void) {
elif isinstance(block, Module):
for name,declblock in block.a.type_decls.items():
self.add(declblock)
- elif isinstance(block, TypeDecl):
- PythonCAPIDerivedType(self, block)
- elif isinstance(block, tuple(declaration_type_spec)):
- PythonCAPIIntrinsicType(self, block)
+ elif isinstance(block, tuple([TypeDecl]+declaration_type_spec)):
+ PythonCAPIType(self, block)
else:
raise NotImplementedError,`block.__class__.__name__`
return