| 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; |
nothing calls this directly
no outgoing calls
no test coverage detected