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

Function lua_next

third-party/lua-5.2.4/src/lapi.c:1114–1128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1112
1113
1114LUA_API int lua_next (lua_State *L, int idx) {
1115 StkId t;
1116 int more;
1117 lua_lock(L);
1118 t = index2addr(L, idx);
1119 api_check(L, ttistable(t), "table expected");
1120 more = luaH_next(L, hvalue(t), L->top - 1);
1121 if (more) {
1122 api_incr_top(L);
1123 }
1124 else /* no more elements */
1125 L->top -= 1; /* remove key */
1126 lua_unlock(L);
1127 return more;
1128}
1129
1130
1131LUA_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