MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / lua_next

Function lua_next

xrepo/packages/l/lua/port/lua/src/lapi.c:1256–1270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1254
1255
1256LUA_API int lua_next (lua_State *L, int idx) {
1257 Table *t;
1258 int more;
1259 lua_lock(L);
1260 api_checknelems(L, 1);
1261 t = gettable(L, idx);
1262 more = luaH_next(L, t, L->top - 1);
1263 if (more) {
1264 api_incr_top(L);
1265 }
1266 else /* no more elements */
1267 L->top -= 1; /* remove key */
1268 lua_unlock(L);
1269 return more;
1270}
1271
1272
1273LUA_API void lua_toclose (lua_State *L, int idx) {

Callers 2

luaB_nextFunction · 0.70
findfieldFunction · 0.70

Calls 2

gettableFunction · 0.85
luaH_nextFunction · 0.70

Tested by

no test coverage detected