mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 14:26:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			343 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
	
		
			343 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef OPENMW_COMPONENTS_LUA_LUASTATEPTR_H
 | |
| #define OPENMW_COMPONENTS_LUA_LUASTATEPTR_H
 | |
| 
 | |
| #include <sol/state.hpp>
 | |
| 
 | |
| #include <memory>
 | |
| 
 | |
| namespace LuaUtil
 | |
| {
 | |
|     struct CloseLuaState
 | |
|     {
 | |
|         void operator()(lua_State* state) noexcept { lua_close(state); }
 | |
|     };
 | |
| 
 | |
|     using LuaStatePtr = std::unique_ptr<lua_State, CloseLuaState>;
 | |
| }
 | |
| 
 | |
| #endif
 |