I'm having a hard time trying to make mpi4py compatible with Microsoft
MPI. All the MPI calls are annotated with __stdcall, and callbacks
functions (in my case written in Cython) should also be. But other MPI
implementations (MPICH2 and DeinoMPI) does different, they require
__cdecl. I cannot figure out how to solve that without the help of
Cython....

I'm thinking about ADDITIONALLY supporting the following sintax:

cde int "CALL_SPEC" somefunc():

then I would be able to pass -DCALL_SPEC=__xxx or even conditionally
"#define CALL_SPEC __xxx" in some header...

This could have other uses as well, as the string literal could
provide other annotations (like __attribute__ stuff in GCC).

I've already modified the parser and all seems to work. The only thing
left is to make Cython not so strict about the signatures

I mean, if I use a bare string literal for annotating the function,
then the function types

int "ABC" foo()

int "XYZ" bar()

would be treated as equivalent to the unannotated:

inf fun()

What do you think?

BTW, we should add support for __fastcall calling conventions, like this

int __fastcall func()

-

-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to