Simple sol2 version of the below
| 5 | |
| 6 | // Simple sol2 version of the below |
| 7 | void simple(sol::this_state ts, sol::this_environment te) { |
| 8 | sol::state_view lua = ts; |
| 9 | if (te) { |
| 10 | sol::environment& env = te; |
| 11 | sol::environment freshenv = lua["freshenv"]; |
| 12 | bool is_same_env = freshenv == env; |
| 13 | std::cout << "this_environment -- env == freshenv : " |
| 14 | << is_same_env << std::endl; |
| 15 | } |
| 16 | std::cout << "this_environment -- no environment present" |
| 17 | << std::endl; |
| 18 | } |
| 19 | |
| 20 | // NOTE: |
| 21 | // THIS IS A LOW-LEVEL EXAMPLE, using pieces of sol2 |
nothing calls this directly
no outgoing calls
no test coverage detected