aboutsummaryrefslogtreecommitdiff
path: root/ltablib.c
diff options
context:
space:
mode:
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 fd868915..8fced7a3 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltablib.c,v 1.74 2014/08/21 19:13:55 roberto Exp roberto $ 2** $Id: ltablib.c,v 1.75 2014/08/21 20:07:56 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*/
@@ -126,10 +126,10 @@ static int tmove (lua_State *L) {
126 luaL_argcheck(L, f > 0, 2, "initial position must be positive"); 126 luaL_argcheck(L, f > 0, 2, "initial position must be positive");
127 if (e >= f) { /* otherwise, nothing to move */ 127 if (e >= f) { /* otherwise, nothing to move */
128 lua_Integer n, i; 128 lua_Integer n, i;
129 ta.geti = (!luaL_getmetafield(L, 1, "__index")) 129 ta.geti = (luaL_getmetafield(L, 1, "__index") == LUA_TNIL)
130 ? (luaL_checktype(L, 1, LUA_TTABLE), lua_rawgeti) 130 ? (luaL_checktype(L, 1, LUA_TTABLE), lua_rawgeti)
131 : lua_geti; 131 : lua_geti;
132 ta.seti = (!luaL_getmetafield(L, tt, "__newindex")) 132 ta.seti = (luaL_getmetafield(L, tt, "__newindex") == LUA_TNIL)
133 ? (luaL_checktype(L, tt, LUA_TTABLE), lua_rawseti) 133 ? (luaL_checktype(L, tt, LUA_TTABLE), lua_rawseti)
134 : lua_seti; 134 : lua_seti;
135 n = e - f + 1; /* number of elements to move */ 135 n = e - f + 1; /* number of elements to move */