stdcall

Manuel M T Chakravarty chak at cse.unsw.edu.au
Thu Jul 24 09:52:01 EDT 2003


Ross Paterson <ross at soi.city.ac.uk> wrote,

> Could the meaning of stdcall be broadened to "the standard calling
> convention for libraries on the native system", i.e. pascal on Win32
> (as now) and ccall on Unix?  It would save a lot of fuss for interfaces
> to portable libraries.

If I am not mistaken, we have had this discussion before.
Unfortunately, haskell.org mailing list archives are not
easy to search, so please excuse the lack of reference.  In
fact, the FFI used to have a default calling convention and
we made a conscious decision against having a default.

"Simon Marlow" <simonmar at microsoft.com> wrote,

> So I'd say that specifying a "default" calling convention which maps to
> stdcall on Windows and ccall on Unix is probably a bad idea.  You've
> just got to know which one to use on Windows - this is the job for a
> tool which checks the FFI decls against the prototypes.

IIRC, that was the gist of the argument last time.  I
propose to stick with this previous decision.

Cheers,
Manuel




More information about the FFI mailing list