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

Method open_func

tests/run_time/source/state.cpp:188–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186TEST_CASE("state/require", "require using a function") {
187 struct open {
188 static int open_func(lua_State* L) {
189 sol::state_view lua = L;
190 return sol::stack::push(L, lua.create_table_with("modfunc", sol::as_function([]() { return 221; })));
191 }
192 };
193
194 sol::state lua;

Callers

nothing calls this directly

Calls 3

pushFunction · 0.85
as_functionFunction · 0.85
create_table_withMethod · 0.80

Tested by

no test coverage detected