lua-users home
lua-l archive

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

YangFan wrote:
> I think that's not true, LuaJIT is announced to be a drop-in
> replace of Lua, and provides Lua source level compatible with
> standard Lua C API. 

Yes, you can just replace the DLL. No need to recompile.

But there's a general caveat on Windows: all C symbols (e.g.
lua_pcall) are bound to a specific DLL name. This means that you
need to keep the name of the Lua DLL (i.e. lua51.dll) for the
LuaJIT DLL, too.

If some parts of your code link to the LuaJIT DLL (because you
used a new name), but other parts (like a loadable module) link to
the Lua DLL, you are guaranteed to get a crash.

> My problem here seems to illustrate a incompatible defect of
> LuaJIT. I can reproduce this at ease, and made a screen
> capturing film for the reproducing steps, but the mail list
> limites the mail size smaller than 40 KB, I cannot upload it
> there. Does any one give me an official explanation? 

A screen capture probably wouldn't help. I need a (small) test
case that illustrates the problem. And I need source code to
diagnose this, like a small C program plus a Lua program that
shows the crash.

That said, I have no other bug reports about lua_pcall. It's used
in the stand-alone executable (luajit.exe) without problems.