| 10 | |
| 11 | template <typename Handler> |
| 12 | bool sol_lua_check(sol::types<two_things>, lua_State* L, |
| 13 | int index, Handler&& handler, |
| 14 | sol::stack::record& tracking) { |
| 15 | // indices can be negative to count backwards from the top |
| 16 | // of the stack, rather than the bottom up to deal with |
| 17 | // this, we adjust the index to its absolute position using |
| 18 | // the lua_absindex function |
| 19 | int absolute_index = lua_absindex(L, index); |
| 20 | // Check first and second second index for being the proper |
| 21 | // types |
| 22 | bool success |
| 23 | = sol::stack::check<int>(L, absolute_index, handler) |
| 24 | && sol::stack::check<bool>( |
| 25 | L, absolute_index + 1, handler); |
| 26 | tracking.use(2); |
| 27 | return success; |
| 28 | } |
| 29 | |
| 30 | two_things sol_lua_get(sol::types<two_things>, lua_State* L, |
| 31 | int index, sol::stack::record& tracking) { |
nothing calls this directly
no test coverage detected