From 79cbc3468caeab89b1c8492d54e1c28e7aafd1ed Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 5 Jul 2011 09:49:35 -0300 Subject: removed and deprecated functions really removed from the code base --- ltablib.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'ltablib.c') diff --git a/ltablib.c b/ltablib.c index 152135a7..b2e89e8e 100644 --- a/ltablib.c +++ b/ltablib.c @@ -1,5 +1,5 @@ /* -** $Id: ltablib.c,v 1.59 2010/12/17 12:15:34 roberto Exp roberto $ +** $Id: ltablib.c,v 1.60 2011/07/02 16:01:44 roberto Exp roberto $ ** Library for Table Manipulation ** See Copyright Notice in lua.h */ @@ -20,11 +20,6 @@ (luaL_checktype(L, n, LUA_TTABLE), luaL_len(L, n)) -static int removedfunc (lua_State *L) { - return luaL_error(L, "removed function"); -} - - #if defined(LUA_COMPAT_MAXN) static int maxn (lua_State *L) { lua_Number max = 0; @@ -40,8 +35,6 @@ static int maxn (lua_State *L) { lua_pushnumber(L, max); return 1; } -#else -#define maxn removedfunc #endif @@ -267,10 +260,9 @@ static int sort (lua_State *L) { static const luaL_Reg tab_funcs[] = { {"concat", tconcat}, - {"foreach", removedfunc}, - {"foreachi", removedfunc}, - {"getn", removedfunc}, +#if defined(LUA_COMPAT_MAXN) {"maxn", maxn}, +#endif {"insert", tinsert}, {"pack", pack}, {"unpack", unpack}, -- cgit v1.2.3-55-g6feb