summaryrefslogtreecommitdiff
path: root/src/ltablib.c
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2011-07-05 12:00:00 +0000
committerrepogen <>2011-07-05 12:00:00 +0000
commit76e52968cfea8eccaffae99512879d664796e6a6 (patch)
tree6105722d5a672f6bc2280bfd54f4e7b9531431cb /src/ltablib.c
parentcc3a4be74122bb2c002798696730bca68d36fcc9 (diff)
downloadlua-github-5.2.0-beta-rc6.tar.gz
Lua 5.2.0-beta-rc65.2.0-beta-rc6
Diffstat (limited to 'src/ltablib.c')
-rw-r--r--src/ltablib.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/ltablib.c b/src/ltablib.c
index 6898442e..06353c7b 100644
--- a/src/ltablib.c
+++ b/src/ltablib.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltablib.c,v 1.60 2011/07/02 16:01:44 roberto Exp $
+** $Id: ltablib.c,v 1.61 2011/07/05 12:49:35 roberto Exp $
** 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},