Is there a SWIG module for Squeak?
Stephen Pair
spair at advantive.com
Mon Sep 10 13:51:37 UTC 2001
> > Isn't apicall: just the PASCAL calling convention?
>
> Dunno. What is Delphi (the only Pascal I'm aware of these
> days) using?!
Last I checked (several years ago) it uses the Pascal calling
convention, except when compiling DLLs and explicitly directed to use
the C calling convention.
> > It doesn't seem that apicall: should necessarily be tied to any
> > specific OS however (even though other OSes might not make
> any use of
> > it). It should be possible to make libraries on
> non-Windows (and Mac)
> > OSes that use apicall: no?
>
> Probably so. But what's the point?!
There is no point. I was just clarifying it's the module that you
choose to use that can make you non-portable, not FFI itself. And who
know what kind of calling convention some library developer might choose
to use (could be apicall on Linux...what does WINE use?).
> The only reason for
> making <apicall:> available at all is that many of the OS
> function use something other than <cdecl:> and therefore you
> couldn't call them otherwise. There are many other existing
> calling conventions (such as the infamous __fastcall on x86)
> which aren't supported by the FFI either.
Yes there are. FFI should be designed such that new calling conventions
could be supported with minimal effort.
- Stephen
More information about the Squeak-dev
mailing list
|