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

Method thing

examples/source/self_from_lua.cpp:14–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12 struct thing {
13
14 thing(sol::this_state ts) {
15 lua_State* L = ts;
16 // references the object that called this function
17 // in constructors:
18 sol::stack_object selfobj(L, 1);
19
20 // definitely the same
21 thing& self = selfobj.as<thing>();
22 SOL_ASSERT(&self == this);
23 }
24
25 void func(sol::this_state ts) const {
26 lua_State* L = ts;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected