Pyfort replaces floating-type arguments (float, double,
complex variables) with arrays of length one to ensure
uniform treatment of casting and work around problems
with complex variables. This causes a problem when the
C-compiler option is used, as float and double
variables then get passed as a pointer instead of by
value. This works fine for Fortran, where all variables
are passed by reference anyway, but not for C where
variables are passed by value.
In the patch, replacing floating-type arguments by
arrays of length one is skipped if the C-compiler
option is used. This then lets parameters to get passed
by value, and solves the problem. I am not sure if that
will cause problems with casting -- my hope is that it
won't as we are calling C from C in this case.
Michiel de Hoon
University of Tokyo, Human Genome Center
Log in to post a comment.