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

Function lua_c_wrapper

extlibs/sol3/include/sol/sol.hpp:17540–17549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17538
17539 template <bool yielding>
17540 int lua_c_wrapper(lua_State* L) {
17541 lua_CFunction cf = lua_tocfunction(L, lua_upvalueindex(2));
17542 int nr = cf(L);
17543 if constexpr (yielding) {
17544 return lua_yield(L, nr);
17545 }
17546 else {
17547 return nr;
17548 }
17549 }
17550
17551 template <bool yielding>
17552 int lua_c_noexcept_wrapper(lua_State* L) noexcept {

Callers

nothing calls this directly

Calls 1

lua_tocfunctionFunction · 0.85

Tested by

no test coverage detected