lua-users home
lua-l archive

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


>I'm using Delphi with the lua DLL in some programs and I would use the multi 
>thread capacity of lua 4.1 but I can't because the function needed to it 
>(lua_lock, lua_unlock, ...) must be defined at compilation time.
>
>Can you export some access to allow modification of it with the Lua API by the 
>host application.

You should create a header file containing your definitions of lua_lock
and lua_unlock. See etc/luser_pthread.h for an example. Then #define LUA_USER_H
to be the named of this header file (quoted) and build Lua.

The LUA_USER_H macro is a general mechanism introduced in 4.1 so that users
can build their own customized version of Lua. See etc/luser*.h for other
examples, including building integer-only and wchar versions.
--lhf