From c80639acbd9c0e5f49db4b46f49d1e51059b7d2a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 14 Jan 2007 00:20:16 +0000 Subject: [PATCH] remove LuaFunctionList --- stepmania/src/LuaManager.cpp | 13 ------------- stepmania/src/LuaManager.h | 9 --------- 2 files changed, 22 deletions(-) diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index d12fd2bb44..188f16afe3 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -26,7 +26,6 @@ struct Impl RageMutex g_pLock; }; static Impl *pImpl = NULL; -static LuaFunctionList *g_LuaFunctions = NULL; #if defined(_MSC_VER) || defined (_XBOX) /* "interaction between '_setjmp' and C++ object destruction is non-portable" @@ -279,9 +278,6 @@ void LuaManager::RegisterTypes() { Lua *L = LUA->Get(); - for( const LuaFunctionList *p = g_LuaFunctions; p; p=p->next ) - lua_register( L, p->name, p->func ); - if( g_vRegisterActorTypes ) { for( unsigned i=0; isize(); i++ ) @@ -790,15 +786,6 @@ void LuaHelpers::PushValueFunc( lua_State *L, int iArgs ) lua_pushcclosure( L, lua_pushvalues, iArgs+1 ); } -LuaFunctionList::LuaFunctionList( RString name_, lua_CFunction func_ ) -{ - name = name_; - func = func_; - next = g_LuaFunctions; - g_LuaFunctions = this; -} - - static bool Trace( const RString &sString ) { LOG->Trace( "%s", sString.c_str() ); diff --git a/stepmania/src/LuaManager.h b/stepmania/src/LuaManager.h index 66becbcdb0..f5a58bca50 100644 --- a/stepmania/src/LuaManager.h +++ b/stepmania/src/LuaManager.h @@ -186,15 +186,6 @@ inline bool MyLua_checkintboolean( lua_State *L, int iArg ) #define BArg(n) (MyLua_checkboolean(L,(n))) #define FArg(n) ((float) luaL_checknumber(L,(n))) -/* Linked list of functions we make available to Lua. */ -struct LuaFunctionList -{ - LuaFunctionList( RString name, lua_CFunction func ); - RString name; - lua_CFunction func; - LuaFunctionList *next; -}; - #define LuaFunction( func, expr ) \ int LuaFunc_##func( lua_State *L ) { \ LuaHelpers::Push( L, expr ); return 1; \