MCPcopy Create free account
hub / github.com/ThePhD/sol2 / call

Method call

include/sol/packaged_coroutine.hpp:247–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

pushFunction · 0.85
multi_push_referenceFunction · 0.85
invokeFunction · 0.85

Tested by

no test coverage detected