| 1415 | } |
| 1416 | |
| 1417 | static int complex_enum_inext(lua_State *L) |
| 1418 | { |
| 1419 | bool is_first = lua_isuserdata(L, 2); |
| 1420 | int64_t i = (is_first) |
| 1421 | ? ((enum_identity::ComplexData*)lua_touserdata(L, lua_upvalueindex(2)))->index_value_map[0] |
| 1422 | : luaL_checkint(L, 2); |
| 1423 | if (is_first || complex_enum_next_item_helper(L, i)) |
| 1424 | { |
| 1425 | lua_pushinteger(L, i); |
| 1426 | lua_rawgeti(L, lua_upvalueindex(1), i); |
| 1427 | return 2; |
| 1428 | } |
| 1429 | else |
| 1430 | { |
| 1431 | lua_pushnil(L); |
| 1432 | return 1; |
| 1433 | } |
| 1434 | } |
| 1435 | |
| 1436 | static int complex_enum_next_item(lua_State *L) |
| 1437 | { |
nothing calls this directly
no test coverage detected