@@ -918,7 +918,7 @@ def getuseblocks(pymod):
918
918
all_uses .extend ([x for x in modblock .get ("use" ).keys () if "__" not in x ])
919
919
return all_uses
920
920
921
- def process_f2cmap_dict (f2cmap_all , new_map , c2py_map ):
921
+ def process_f2cmap_dict (f2cmap_all , new_map , c2py_map , verbose = False ):
922
922
"""
923
923
Update the Fortran-to-C type mapping dictionary with new mappings and
924
924
return a list of successfully mapped C types.
@@ -947,6 +947,9 @@ def process_f2cmap_dict(f2cmap_all, new_map, c2py_map):
947
947
types to corresponding Python types and is used to ensure that the C
948
948
types specified in `new_map` are valid.
949
949
950
+ verbose : boolean
951
+ A flag used to provide information about the types mapped
952
+
950
953
Returns
951
954
-------
952
955
tuple of (dict, list)
@@ -972,12 +975,14 @@ def process_f2cmap_dict(f2cmap_all, new_map, c2py_map):
972
975
% (k , k1 , f2cmap_all [k ][k1 ], v1 )
973
976
)
974
977
f2cmap_all [k ][k1 ] = v1
975
- outmess ('\t Mapping "%s(kind=%s)" to "%s"\n ' % (k , k1 , v1 ))
978
+ if verbose :
979
+ outmess ('\t Mapping "%s(kind=%s)" to "%s"\n ' % (k , k1 , v1 ))
976
980
f2cmap_mapped .append (v1 )
977
981
else :
978
- errmess (
979
- "\t Ignoring map {'%s':{'%s':'%s'}}: '%s' must be in %s\n "
980
- % (k , k1 , v1 , v1 , list (c2py_map .keys ()))
981
- )
982
+ if verbose :
983
+ errmess (
984
+ "\t Ignoring map {'%s':{'%s':'%s'}}: '%s' must be in %s\n "
985
+ % (k , k1 , v1 , v1 , list (c2py_map .keys ()))
986
+ )
982
987
983
988
return f2cmap_all , f2cmap_mapped
0 commit comments