| 978 | |
| 979 | |
| 980 | LUA_API int lua_next (lua_State *L, int idx) { |
| 981 | StkId t; |
| 982 | int more; |
| 983 | lua_lock(L); |
| 984 | t = index2adr(L, idx); |
| 985 | api_check(L, ttistable(t)); |
| 986 | more = luaH_next(L, hvalue(t), L->top - 1); |
| 987 | if (more) { |
| 988 | api_incr_top(L); |
| 989 | } |
| 990 | else /* no more elements */ |
| 991 | L->top -= 1; /* remove key */ |
| 992 | lua_unlock(L); |
| 993 | return more; |
| 994 | } |
| 995 | |
| 996 | |
| 997 | LUA_API void lua_concat (lua_State *L, int n) { |
no test coverage detected