lua-users home
lua-l archive

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

Hello All,

I'm porting a video game that uses Lua 5.0. The interpreter frequently crashes on startup and the evidence points to a reference counting bug or perhaps simple data corruption. The game uses true preemptive threads, but Lua is only called from the main thread, and I understand that within Lua "threads" are just cooperative coroutines. Anyway, I noticed that the lua_lock() and lua_unlock() macros don't generate any code. This is hardly surprising since both are defined as ((void) 0) -- see

I apologize for being a complete Lua newbie and also for not having read the voluminous archives, but can anyone tell me what's going on with these macros? I read in one posting how someone solved a problem with them, but I must confess I don't get it.

Many thanks,

David Gish