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

Function lua_next

third-party/lua-5.3.5/src/lapi.c:1123–1137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1121
1122
1123LUA_API int lua_next (lua_State *L, int idx) {
1124 StkId t;
1125 int more;
1126 lua_lock(L);
1127 t = index2addr(L, idx);
1128 api_check(L, ttistable(t), "table expected");
1129 more = luaH_next(L, hvalue(t), L->top - 1);
1130 if (more) {
1131 api_incr_top(L);
1132 }
1133 else /* no more elements */
1134 L->top -= 1; /* remove key */
1135 lua_unlock(L);
1136 return more;
1137}
1138
1139
1140LUA_API void lua_concat (lua_State *L, int n) {

Callers 3

luaB_nextFunction · 0.70
findfieldFunction · 0.70
maxnFunction · 0.70

Calls 2

index2addrFunction · 0.70
luaH_nextFunction · 0.70

Tested by

no test coverage detected