| 1007 | |
| 1008 | |
| 1009 | LUA_API int lua_next (lua_State *L, int idx) { |
| 1010 | StkId t; |
| 1011 | int more; |
| 1012 | lua_lock(L); |
| 1013 | t = index2adr(L, idx); |
| 1014 | api_check(L, ttistable(t)); |
| 1015 | more = luaH_next(L, hvalue(t), L->top - 1); |
| 1016 | if (more) { |
| 1017 | api_incr_top(L); |
| 1018 | } |
| 1019 | else /* no more elements */ |
| 1020 | L->top -= 1; /* remove key */ |
| 1021 | lua_unlock(L); |
| 1022 | return more; |
| 1023 | } |
| 1024 | |
| 1025 | |
| 1026 | LUA_API void lua_concat (lua_State *L, int n) { |
no test coverage detected