[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Any common bug-inducting mistake going from 5.0 to 5.1alpha?
- From: Marco Pontello <marcopon@...>
- Date: Tue, 20 Sep 2005 13:17:51 +0200
On 9/20/05, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> 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?
Thanks,
Bye!
--
Online TrID File Identifier
http://mark0.net/onlinetrid/trid.aspx