[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: pascal (delphi) implementation
- From: Dave Bollinger <DBollinger@...>
- Date: Fri, 17 Sep 1999 22:55:59 -0400
>> It seems as if there was an extra POP somewhere. This made me suspect I
may have a
>> problem with my calling convention.
That is almost certainly the problem, and a liberal application of
cdecl's throughout will likely fix it. Note that "stdcall" and "cdecl" are
similar in that they both pass right-to-left, but cdecl expects the caller
to clean up the stack while stdcall expects the callee to clean up the
stack. Thus your extra pops. As a general rule, anything in Delphi that
deals with Lua should be declared "cdecl" (there may be exceptions, but I
can't think of any).
Cheers,
Dave