[fpc-devel] Safecall on Linux (and other unices?)

Paul Ishenin webpirat at mail.ru
Wed Jul 21 13:32:05 CEST 2010


  21.07.2010 18:57, Michael Van Canneyt wrote:
> The problem is that then all XPCom headers must be translated
>
> Procedure SomeMethod; {$ifdef windows}safecall{$else}newsafecall {$endif}
We have a special macros as I remember for this purposes.
>
> Which is a serious pain. I'd prefer then to let safecall be 
> cdecl+exception handling, and in the event that Embarcadero - again - 
> chooses the wrong way, to have a directive:
>
> {$SAFECALLCALLING CDECL}
>
> We have the same for COM/CORBA interfaces, after all.
>
> I think that Linux is FPC territory, it has been for 15 years, and 
> here we should make the rules when on new ground. In this case that 
> means preferring the GCC/G++ way instead of some hypothetical or 
> already proven dead Embarcadero product. In short, it is the logical 
> and obvious choice.
I don't insist on another calling convention (and moreover in real I 
don't want to have more calling conventions). I'm just trying to show 
another point of view to find the optimal solution.

Best regards,
Paul Ishenin.



More information about the fpc-devel mailing list