MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_next

Function lua_next

third-party/lua-5.1.5/src/lapi.c:973–987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

971
972
973LUA_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
990LUA_API void lua_concat (lua_State *L, int n) {

Callers 3

luaB_nextFunction · 0.70
foreachFunction · 0.70
maxnFunction · 0.70

Calls 2

index2adrFunction · 0.85
luaH_nextFunction · 0.70

Tested by

no test coverage detected