[fpc-pascal] PascalScript / FPC: parameters problems (need internals gurus I think)

Alexandre Leclerc alexandre.leclerc at gmail.com
Tue Aug 8 21:36:07 CEST 2006


2006/8/8, Michael Van Canneyt <michael at freepascal.org>:
>
>
> On Tue, 8 Aug 2006, Jonas Maebe wrote:
>
> >
> > On 08 Aug 2006, at 20:39, Alexandre Leclerc wrote:
> >
> > > *Problem*
> > > I'm exporting some classes (originally a TBitmap; now a custom class)
> > > to the ROPS engine and then interacting with the class in the
> > > scripting engine. Everything works, except for some functions that
> > > behave very strange. They skip/duplicate the parameters and invert
> > > parameters.
> >
> > Try declaring the methods as "stdcall" (although I'm not sure whether this
> > works for methods).
>
> That won't work. Delphi doesn't use stdcall by default, so the ROPS engine
> doesn't expect this.
>
> The problem is more likely that all arguments are extended, which probably
> means that the stack is used differently. Are they pushed on the FPU stack ?

I was exactly thinking about the stack. But I don't know how it work.
Ok, now Bitmap.Canvas.Rectangle uses Integer and it has the same
behaviour. So it is probably not only a matter of extended? Now I
would gladly answer that question, but Carlo Kok is in vacation (he is
The guy about ROPS). Well, I like what you bring - I'm no stack expert
- but if you want you can speculate more :) I can try to find answers
in the code.

-- 
Alexandre Leclerc



More information about the fpc-pascal mailing list