| 211 | |
| 212 | |
| 213 | static int luaB_next (lua_State *L) { |
| 214 | luaL_checktype(L, 1, LUA_TTABLE); |
| 215 | lua_settop(L, 2); /* create a 2nd argument if there isn't one */ |
| 216 | if (lua_next(L, 1)) |
| 217 | return 2; |
| 218 | else { |
| 219 | lua_pushnil(L); |
| 220 | return 1; |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | |
| 225 | static int luaB_pairs (lua_State *L) { |
nothing calls this directly
no test coverage detected