| 7582 | } // namespace detail |
| 7583 | |
| 7584 | inline void set_default_exception_handler(lua_State* L, exception_handler_function exf = &detail::default_exception_handler) { |
| 7585 | static_assert(sizeof(void*) >= sizeof(exception_handler_function), "void* storage is too small to transport the exception handler: please file a bug on the issue tracker"); |
| 7586 | void* storage; |
| 7587 | std::memcpy(&storage, &exf, sizeof(exception_handler_function)); |
| 7588 | lua_pushlightuserdata(L, storage); |
| 7589 | lua_setglobal(L, detail::default_exception_handler_name()); |
| 7590 | } |
| 7591 | } // sol |
| 7592 | |
| 7593 | // end of sol/trampoline.hpp |
no test coverage detected