aboutsummaryrefslogtreecommitdiff
path: root/ltablib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-07-05 09:49:35 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-07-05 09:49:35 -0300
commit79cbc3468caeab89b1c8492d54e1c28e7aafd1ed (patch)
treeca69022ba190df2f3dbfed1d2861d2cf52f4e0af /ltablib.c
parent9e89a55a4fd701a9991d55b73edb93639a48d624 (diff)
downloadlua-79cbc3468caeab89b1c8492d54e1c28e7aafd1ed.tar.gz
lua-79cbc3468caeab89b1c8492d54e1c28e7aafd1ed.tar.bz2
lua-79cbc3468caeab89b1c8492d54e1c28e7aafd1ed.zip
removed and deprecated functions really removed from the code base
Diffstat (limited to 'ltablib.c')
-rw-r--r--ltablib.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/ltablib.c b/ltablib.c
index 152135a7..b2e89e8e 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -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
23static 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)
29static int maxn (lua_State *L) { 24static 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
268static const luaL_Reg tab_funcs[] = { 261static 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},