MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / luaB_next

Function luaB_next

src/lbaselib.cpp:322–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320
321LUAI_FUNC int luaB_next(lua_State *L);
322int luaB_next (lua_State *L) {
323 luaL_checktype(L, 1, LUA_TTABLE);
324 lua_settop(L, 2); /* create a 2nd argument if there isn't one */
325 if (lua_next(L, 1))
326 return 2;
327 else {
328 lua_pushnil(L);
329 return 1;
330 }
331}
332
333
334static int pairscont (lua_State *L, int status, lua_KContext k) {

Callers

nothing calls this directly

Calls 4

luaL_checktypeFunction · 0.85
lua_settopFunction · 0.85
lua_nextFunction · 0.85
lua_pushnilFunction · 0.85

Tested by

no test coverage detected