| 69 | template <typename T, typename... Args> |
| 70 | requires (std::is_trivially_destructible_v<T>) |
| 71 | T* make_lua_userdata(lua_State* L, Args&&... args) |
| 72 | { |
| 73 | void* stg = lua_newuserdata(L, sizeof(T)); |
| 74 | T * obj = ::new (stg) T(std::forward<Args>(args)...); |
| 75 | return obj; |
| 76 | } |
| 77 | |
| 78 | DFHACK_EXPORT void PushDFHack(lua_State *state); |
| 79 | DFHACK_EXPORT void PushBaseGlobals(lua_State *state); |
nothing calls this directly
no test coverage detected