| 1352 | } |
| 1353 | |
| 1354 | static int wtype_inext(lua_State *L) |
| 1355 | { |
| 1356 | int i = luaL_checkint(L, 2); |
| 1357 | i++; /* next value */ |
| 1358 | if (i <= lua_tointeger(L, lua_upvalueindex(2))) |
| 1359 | { |
| 1360 | lua_pushinteger(L, i); |
| 1361 | lua_rawgeti(L, lua_upvalueindex(1), i); |
| 1362 | return 2; |
| 1363 | } |
| 1364 | else |
| 1365 | { |
| 1366 | lua_pushnil(L); |
| 1367 | return 1; |
| 1368 | } |
| 1369 | } |
| 1370 | |
| 1371 | static int wtype_ipairs(lua_State *state) |
| 1372 | { |
nothing calls this directly
no test coverage detected