[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua vs. multi-threads / events driven based application / async operation
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 23 Jan 2009 09:21:03 -0200
> 3: The luaopen_* methods cannot be called directly from C; they should
> be called as Lua C functions like so:
> lua_pushcfunction(L, luaopen_io);
> lua_pushliteral(L, "io");
> lua_call(L, 1, 0);
> Or, like so:
> lua_cpall(L, luaopen_io, "io");
Or just call luaL_openlibs, editing lualibs in linit.c to suit your needs.
linit.c is meant to be edited and added to your app.