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