diff options
| author | Rohit Goswami <rog32@hi.is> | 2022-06-10 03:33:28 +0000 |
|---|---|---|
| committer | Rohit Goswami <rog32@hi.is> | 2022-06-10 03:33:28 +0000 |
| commit | 006be68a122c037bfc6b9651ad0d60d73654f54e (patch) | |
| tree | e839426981cecb8096bbbd2b49ce92cde3336cdd /numpy | |
| parent | 6032e0ab72be408497c14fd5b865bb25a4c800e7 (diff) | |
| download | numpy-006be68a122c037bfc6b9651ad0d60d73654f54e.tar.gz | |
BUG: Generate C typedefs for f2cmap types
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/f2py/capi_maps.py | 2 | ||||
| -rwxr-xr-x | numpy/f2py/rules.py | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/numpy/f2py/capi_maps.py b/numpy/f2py/capi_maps.py index e5dc2331a..f07066a09 100644 --- a/numpy/f2py/capi_maps.py +++ b/numpy/f2py/capi_maps.py @@ -176,6 +176,7 @@ f2cmap_all = {'real': {'': 'float', '4': 'float', '8': 'double', f2cmap_default = copy.deepcopy(f2cmap_all) +f2cmap_mapped = [] def load_f2cmap_file(f2cmap_file): global f2cmap_all @@ -212,6 +213,7 @@ def load_f2cmap_file(f2cmap_file): f2cmap_all[k][k1] = d[k][k1] outmess('\tMapping "%s(kind=%s)" to "%s"\n' % (k, k1, d[k][k1])) + f2cmap_mapped.append(d[k][k1]) else: errmess("\tIgnoring map {'%s':{'%s':'%s'}}: '%s' must be in %s\n" % ( k, k1, d[k][k1], d[k][k1], list(c2py_map.keys()))) diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py index c9c3b2383..63c48a878 100755 --- a/numpy/f2py/rules.py +++ b/numpy/f2py/rules.py @@ -1323,6 +1323,9 @@ def buildmodule(m, um): rd = dictappend(rd, ar) needs = cfuncs.get_needs() + # Add mapped definitions + needs['typedefs'] += [cvar for cvar in capi_maps.f2cmap_mapped # + if cvar in typedef_need_dict.values()] code = {} for n in needs.keys(): code[n] = [] |
