lua-users home
lua-l archive

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

On 9/20/05, Luiz Henrique de Figueiredo <> wrote:
> > - Register some functions
> If you're using luaopen_* to register functions, then this has changed in 5.1:
> the luaopen_* functions now should be called using the Lua call protocol not
> called directly. See luaL_openlibs linit.c.

At the moment I wasn't registering the functions as/in a library, but
something like this:

Lua_PushCClosure(hLuaHandle, pMyFunction, 0)
Lua_PushString(hLuaHandle, STRPTR(pLuaName$))
Lua_Insert(hLuaHandle, -2)
Lua_SetTable(hLuaHandle, %LUA_GLOBALSINDEX)

Maybe that?


Online TrID File Identifier