| 245 | |
| 246 | template <typename... Ret, typename... Args> |
| 247 | decltype(auto) call(Args&&... args) { |
| 248 | // some users screw up coroutine.create |
| 249 | // and try to use it with sol::coroutine without ever calling the first resume in Lua |
| 250 | // this makes the stack incompatible with other kinds of stacks: protect against this |
| 251 | // make sure coroutines don't screw us over |
| 252 | base_t::push(); |
| 253 | int pushcount = stack::multi_push_reference(lua_state(), std::forward<Args>(args)...); |
| 254 | return invoke(types<Ret...>(), std::make_index_sequence<sizeof...(Ret)>(), pushcount); |
| 255 | } |
| 256 | }; |
| 257 | |
| 258 | #endif |
nothing calls this directly
no test coverage detected