[fpc-devel] RTTI method paramlist broken?
Paul Ishenin
webpirat at mail.ru
Sat Sep 12 13:20:06 CEST 2009
Jonas Maebe wrote:
>> Where is the calling convention in the RTTI stored?
>
> I don't think it is stored anywhere (does Delphi specify whether e.g.
> register or stdcall is used?). But you shouldn't need it for the
> parameter order, because depending on whether the calling convention
> specifies left-to-right or right-to-left pushing, the order of the
> parameters in the rtti also changes. That's why
> tests/webtbs/tw12038.pp contains stdcall for all methods, because
> otherwise I can't use constant strings to check the results (since on
> i386, the default calling convention pushes from left to right instead
> of from right to left). This is at least Kylix-compatible.
Just tested with D2009:
TStdcallMethod = procedure(Sender: TObject; Something: LongInt) of
object; stdcall;
If it is stdcall then methods must be listed in the rtti right-to-left
but delphi stored Sender as first and Something as second.
Best regards,
Paul Ishenin.
More information about the fpc-devel
mailing list