| 2820 | |
| 2821 | |
| 2822 | LUA_API int lua_next (lua_State *L, int idx) { |
| 2823 | StkId t; |
| 2824 | int more; |
| 2825 | lua_lock(L); |
| 2826 | t = index2adr(L, idx); |
| 2827 | api_check(L, ttistable(t)); |
| 2828 | more = luaH_next(L, hvalue(t), L->top - 1); |
| 2829 | if (more) { |
| 2830 | api_incr_top(L); |
| 2831 | } |
| 2832 | else /* no more elements */ |
| 2833 | L->top -= 1; /* remove key */ |
| 2834 | lua_unlock(L); |
| 2835 | return more; |
| 2836 | } |
| 2837 | |
| 2838 | |
| 2839 | LUA_API void lua_concat (lua_State *L, int n) { |
no test coverage detected