lua-users home
lua-l archive

pascal (delphi) implementation

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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

AltStyle によって変換されたページ (->オリジナル) /