lua-users home
lua-l archive

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


Shmuel Zeigerman wrote:
FWIW, the lines in luaconf.h cited below are what cause exceptions after a Delphi DLL is loaded. This explains why lua5.1.dll built with GCC happens to work in this situation: it doesn't contain those lines.

/* On a Microsoft compiler, use assembler */
#if defined(_MSC_VER)

#define lua_number2int(i,d)   __asm fld d   __asm fistp i
That particular guy caused me a lot of grief trying to get it to compile on anything more then a single line. Solved the problem with an 'interesting' use of semicolons and such. Though for why it'd cause an exception in delphi is beyond me, perhaps in the way the numbers are stored? Generally I've found it a Bad-Idea to try to mix assembly/intrinsics from different compilers into one project.