#4 Bugfix for double with C


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


  • Michiel de Hoon

    Michiel de Hoon - 2002-04-16

    Patch for generator.py to fix floats with C

  • Paul F. Dubois

    Paul F. Dubois - 2002-04-19

    Logged In: YES

    In 7.1, thanks.

  • Paul F. Dubois

    Paul F. Dubois - 2002-04-19
    • assigned_to: nobody --> dubois
    • status: open --> closed-accepted

Log in to post a comment.