lua-users home
lua-l archive

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

> 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.