| 1092 | |
| 1093 | |
| 1094 | LUA_API int lua_next (lua_State *L, int idx) { |
| 1095 | StkId t; |
| 1096 | int more; |
| 1097 | lua_lock(L); |
| 1098 | t = index2addr(L, idx); |
| 1099 | api_check(ttistable(t), "table expected"); |
| 1100 | more = luaH_next(L, hvalue(t), L->top - 1); |
| 1101 | if (more) { |
| 1102 | api_incr_top(L); |
| 1103 | } |
| 1104 | else /* no more elements */ |
| 1105 | L->top -= 1; /* remove key */ |
| 1106 | lua_unlock(L); |
| 1107 | return more; |
| 1108 | } |
| 1109 | |
| 1110 | |
| 1111 | LUA_API void lua_concat (lua_State *L, int n) { |
no test coverage detected