>What is the best way of declaring Fortran types in C? I understand there
>is likely no perfect cross-platform solution here

ISO Fortran 2003 has standard bindings to ISO C. Most Fortran compilers
support them, including gfortran. These C bindings make C callable from
Fortran, but they also make Fortran callable from C in a standardized and
portable way.

The short receipe is: you don't declare any Fortran types in C. You
declare your Fortran functions with C types. This even includes
pass-by-value calling convention. Then the Fortran compiler will do the
correct conversion.

>Furthermore it would be very sweet to
>automatically be able to pass Python buffer objects as F90 assumed-shape
>arrays :-)

Take a look at the array-descriptor library of Chasm.

http://chasm-interop.sourceforge.net/


Regards,
Sturla Molden

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to