MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / call

Method call

extlibs/sol3/include/sol/sol.hpp:17312–17334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17310 }
17311
17312 int call(lua_State* L) {
17313 int nr;
17314 {
17315 M mem = detail::unwrap(detail::deref(member));
17316 switch (lua_gettop(L)) {
17317 case 0:
17318 nr = call_detail::call_wrapped<T, true, false, -1>(L, var, mem);
17319 break;
17320 case 1:
17321 nr = call_detail::call_wrapped<T, false, false, -1>(L, var, mem);
17322 break;
17323 default:
17324 nr = luaL_error(L, "sol: incorrect number of arguments to member variable function");
17325 break;
17326 }
17327 }
17328 if (is_yielding) {
17329 return lua_yield(L, nr);
17330 }
17331 else {
17332 return nr;
17333 }
17334 }
17335
17336 int operator()(lua_State* L) {
17337 auto f = [&](lua_State*) -> int { return this->call(L); };

Callers 1

operator()Method · 0.95

Calls 4

unwrapFunction · 0.85
derefFunction · 0.85
lua_gettopFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected