diff options
Diffstat (limited to 'ltablib.c')
-rw-r--r-- | ltablib.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltablib.c,v 1.59 2010/12/17 12:15:34 roberto Exp roberto $ | 2 | ** $Id: ltablib.c,v 1.60 2011/07/02 16:01:44 roberto Exp roberto $ |
3 | ** Library for Table Manipulation | 3 | ** Library for Table Manipulation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -20,11 +20,6 @@ | |||
20 | (luaL_checktype(L, n, LUA_TTABLE), luaL_len(L, n)) | 20 | (luaL_checktype(L, n, LUA_TTABLE), luaL_len(L, n)) |
21 | 21 | ||
22 | 22 | ||
23 | static int removedfunc (lua_State *L) { | ||
24 | return luaL_error(L, "removed function"); | ||
25 | } | ||
26 | |||
27 | |||
28 | #if defined(LUA_COMPAT_MAXN) | 23 | #if defined(LUA_COMPAT_MAXN) |
29 | static int maxn (lua_State *L) { | 24 | static int maxn (lua_State *L) { |
30 | lua_Number max = 0; | 25 | lua_Number max = 0; |
@@ -40,8 +35,6 @@ static int maxn (lua_State *L) { | |||
40 | lua_pushnumber(L, max); | 35 | lua_pushnumber(L, max); |
41 | return 1; | 36 | return 1; |
42 | } | 37 | } |
43 | #else | ||
44 | #define maxn removedfunc | ||
45 | #endif | 38 | #endif |
46 | 39 | ||
47 | 40 | ||
@@ -267,10 +260,9 @@ static int sort (lua_State *L) { | |||
267 | 260 | ||
268 | static const luaL_Reg tab_funcs[] = { | 261 | static const luaL_Reg tab_funcs[] = { |
269 | {"concat", tconcat}, | 262 | {"concat", tconcat}, |
270 | {"foreach", removedfunc}, | 263 | #if defined(LUA_COMPAT_MAXN) |
271 | {"foreachi", removedfunc}, | ||
272 | {"getn", removedfunc}, | ||
273 | {"maxn", maxn}, | 264 | {"maxn", maxn}, |
265 | #endif | ||
274 | {"insert", tinsert}, | 266 | {"insert", tinsert}, |
275 | {"pack", pack}, | 267 | {"pack", pack}, |
276 | {"unpack", unpack}, | 268 | {"unpack", unpack}, |