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

Function luaopen_my_object

examples/require_dll_example/source/my_object.cpp:21–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19} // namespace my_object
20
21extern "C" int luaopen_my_object(lua_State* L) {
22 // pass the lua_State,
23 // the index to start grabbing arguments from,
24 // and the function itself
25 // optionally, you can pass extra arguments to the function
26 // if that's necessary, but that's advanced usage and is
27 // generally reserved for internals only
28 return sol::stack::call_lua(
29 L, 1, my_object::open_my_object);
30}

Callers

nothing calls this directly

Calls 1

call_luaFunction · 0.85

Tested by

no test coverage detected