Hi!
Am 22.07.2010 02:32, schrieb Hans-Peter Diettrich:
Sven Barth schrieb:
Well... for Linux exists no safecall convention and the only library
that might profit from it is XPCOM which uses cdecl procedures that
are compatible with the idea of safecall.
But if we implement safecall on Linux to be used with XPCOM
...then we might make XPCOM unusable on Windows, when it requires a
calling method different from safecall.
You misunderstand that.
XPCOM uses cdecl on Linux and stdcall on Windows.
The order of the parameters of XPCOM is compatible to the
safecall-concept, because the last parameter contains the returned
"object" and the return value is a HResult (or nsresult in case of XPCOM).
On Windows safecall is a wrapper around stdcall. On Linux we don't have
safecall currently and thus could make it a wrapper around cdecl,
because XPCOM uses this on Linux.
Regards,
Sven
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel