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 reference.

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).

DoDi

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to