From 1bd7c3c48055a52dd71e4f1028a069964385c90e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 9 Nov 2006 03:52:59 +0000 Subject: [PATCH] call luaopen() functions through Lua --- stepmania/src/LuaManager.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index a10ec92494..d12fd2bb44 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -174,12 +174,11 @@ LuaManager::LuaManager() lua_atpanic( L, LuaPanic ); m_pLuaMain = L; - luaopen_base( L ); - luaopen_math( L ); - luaopen_string( L ); - luaopen_table( L ); - luaopen_debug( L ); - lua_settop(L, 0); // luaopen_* pushes stuff onto the stack that we don't need + lua_pushcfunction( L, luaopen_base ); lua_call( L, 0, 0 ); + lua_pushcfunction( L, luaopen_math ); lua_call( L, 0, 0 ); + lua_pushcfunction( L, luaopen_string ); lua_call( L, 0, 0 ); + lua_pushcfunction( L, luaopen_table ); lua_call( L, 0, 0 ); + lua_pushcfunction( L, luaopen_debug ); lua_call( L, 0, 0 ); /* Store the thread pool in a table on the stack, in the main thread. */ #define THREAD_POOL 1