diff options
Diffstat (limited to 'ltablib.c')
-rw-r--r-- | ltablib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltablib.c,v 1.90 2015/11/25 12:48:57 roberto Exp roberto $ | 2 | ** $Id: ltablib.c,v 1.91 2015/12/14 11:57:38 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 | */ |
@@ -53,7 +53,7 @@ static void checktab (lua_State *L, int arg, int what) { | |||
53 | lua_pop(L, n); /* pop metatable and tested metamethods */ | 53 | lua_pop(L, n); /* pop metatable and tested metamethods */ |
54 | } | 54 | } |
55 | else | 55 | else |
56 | luaL_argerror(L, arg, "table expected"); /* force an error */ | 56 | luaL_checktype(L, arg, LUA_TTABLE); /* force an error */ |
57 | } | 57 | } |
58 | } | 58 | } |
59 | 59 | ||
@@ -172,7 +172,7 @@ static int tconcat (lua_State *L) { | |||
172 | size_t lsep; | 172 | size_t lsep; |
173 | const char *sep = luaL_optlstring(L, 2, "", &lsep); | 173 | const char *sep = luaL_optlstring(L, 2, "", &lsep); |
174 | lua_Integer i = luaL_optinteger(L, 3, 1); | 174 | lua_Integer i = luaL_optinteger(L, 3, 1); |
175 | last = luaL_opt(L, luaL_checkinteger, 4, last); | 175 | last = luaL_optinteger(L, 4, last); |
176 | luaL_buffinit(L, &b); | 176 | luaL_buffinit(L, &b); |
177 | for (; i < last; i++) { | 177 | for (; i < last; i++) { |
178 | addfield(L, &b, i); | 178 | addfield(L, &b, i); |