| 1209 | |
| 1210 | |
| 1211 | LUA_API int lua_next(lua_State *L, int idx) { |
| 1212 | StkId t; |
| 1213 | int more; |
| 1214 | lua_lock(L); |
| 1215 | t = index2addr(L, idx); |
| 1216 | api_check(L, ttistable(t), "table expected"); |
| 1217 | more = luaH_next(L, hvalue(t), L->top - 1); |
| 1218 | if (more) { |
| 1219 | api_incr_top(L); |
| 1220 | } |
| 1221 | else /* no more elements */ |
| 1222 | L->top -= 1; /* remove key */ |
| 1223 | lua_unlock(L); |
| 1224 | return more; |
| 1225 | } |
| 1226 | |
| 1227 | |
| 1228 | LUA_API void lua_concat(lua_State *L, int n) { |
no test coverage detected