[fpc-devel] Safecall on Linux (and other unices?)
DrDiettrich1 at aol.com
Wed Jul 21 16:36:01 CEST 2010
José Mejuto schrieb:
> It is not 100% cdecl, const records in safecall must be passed as
> reference while in cdecl a copy of the record is being passed.
Copies IMO make no sense here, when "const" protects the record elements
from any modifications. That's why a compiler should be free to pass
short consts by value, and larger ones (exceeding sizeof(pointer)) by
But of course the definition of the systemwide cdecl and safecall
conventions must be observed. When no such definition exists for
safecall on a platform, every compiler can define it differently,
preventing the use of such procedures in external code (.so).
More information about the fpc-devel