call luaopen() functions through Lua
This commit is contained in:
@@ -174,12 +174,11 @@ LuaManager::LuaManager()
|
|||||||
lua_atpanic( L, LuaPanic );
|
lua_atpanic( L, LuaPanic );
|
||||||
m_pLuaMain = L;
|
m_pLuaMain = L;
|
||||||
|
|
||||||
luaopen_base( L );
|
lua_pushcfunction( L, luaopen_base ); lua_call( L, 0, 0 );
|
||||||
luaopen_math( L );
|
lua_pushcfunction( L, luaopen_math ); lua_call( L, 0, 0 );
|
||||||
luaopen_string( L );
|
lua_pushcfunction( L, luaopen_string ); lua_call( L, 0, 0 );
|
||||||
luaopen_table( L );
|
lua_pushcfunction( L, luaopen_table ); lua_call( L, 0, 0 );
|
||||||
luaopen_debug( L );
|
lua_pushcfunction( L, luaopen_debug ); lua_call( L, 0, 0 );
|
||||||
lua_settop(L, 0); // luaopen_* pushes stuff onto the stack that we don't need
|
|
||||||
|
|
||||||
/* Store the thread pool in a table on the stack, in the main thread. */
|
/* Store the thread pool in a table on the stack, in the main thread. */
|
||||||
#define THREAD_POOL 1
|
#define THREAD_POOL 1
|
||||||
|
|||||||
Reference in New Issue
Block a user