From cd3c566ca4b9d18f75a2e596b6f70da16ab50dd0 Mon Sep 17 00:00:00 2001 From: Rui Guo Date: Wed, 19 Aug 2009 01:14:22 +0800 Subject: [PATCH] Get rid of some legacy code. --- src/lua.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/lua.c b/src/lua.c index 110eb88..5538d43 100644 --- a/src/lua.c +++ b/src/lua.c @@ -1302,45 +1302,6 @@ LuaShowErr(lua_State *L) display = d; } -struct fn_def -{ - void (*push_fn)(lua_State *, void*); - void *value; -}; - -static int -LuaCallProcess(const char *name, struct fn_def defs[]) -{ - int argc = 0; - lua_State *L; - struct sfile *slist = scripts; - - while (slist) { - L = slist->L; - - lua_getfield(L, LUA_GLOBALSINDEX, name); - if (lua_isnil(L, -1)) - { - lua_pop(L,1); - slist = slist->next; - } - else - break; - } - - if (!slist) - return 0; - - for (argc = 0; defs[argc].push_fn; argc++) - defs[argc].push_fn(L, defs[argc].value); - if (lua_pcall(L, argc, 0, 0) == LUA_ERRRUN && lua_isstring(L, -1)) - { - LuaShowErr(L); - return 0; - } - return 1; -} - void LuaUnload(struct sfile *slist) { -- 2.11.4.GIT