aboutsummaryrefslogtreecommitdiff
path: root/ltablib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-04-04 11:23:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-04-04 11:23:41 -0300
commit03c6a05ec836c3a90a6b8d730120afdad39c092b (patch)
tree31f0bdf82969b1e082e92d7b5dd5d9e1496d64af /ltablib.c
parent3d0b5edfe4df7ec54d6885b6b6ce917faddf6661 (diff)
downloadlua-03c6a05ec836c3a90a6b8d730120afdad39c092b.tar.gz
lua-03c6a05ec836c3a90a6b8d730120afdad39c092b.tar.bz2
lua-03c6a05ec836c3a90a6b8d730120afdad39c092b.zip
no more nil-in-table
Diffstat (limited to 'ltablib.c')
-rw-r--r--ltablib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltablib.c b/ltablib.c
index 5a78c15b..7bbc3a07 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltablib.c,v 1.95 2018/02/27 18:47:32 roberto Exp roberto $ 2** $Id: ltablib.c,v 1.96 2018/03/16 14:18:18 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*/
@@ -95,8 +95,8 @@ static int tremove (lua_State *L) {
95 lua_geti(L, 1, pos + 1); 95 lua_geti(L, 1, pos + 1);
96 lua_seti(L, 1, pos); /* t[pos] = t[pos + 1] */ 96 lua_seti(L, 1, pos); /* t[pos] = t[pos + 1] */
97 } 97 }
98 lua_pushinteger(L, pos); 98 lua_pushnil(L);
99 lua_removekey(L, 1); /* remove entry t[pos] */ 99 lua_seti(L, 1, pos); /* remove entry t[pos] */
100 return 1; 100 return 1;
101} 101}
102 102