From a059088c90fafb9ef21840db338f6bd04023b096 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 7 Dec 2018 20:16:33 +0800 Subject: *init --- src/luax_state.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/luax_state.h') diff --git a/src/luax_state.h b/src/luax_state.h index e69de29..1f80fda 100644 --- a/src/luax_state.h +++ b/src/luax_state.h @@ -0,0 +1,27 @@ +#ifndef __LUAX_STATE_H__ +#define __LUAX_STATE_H__ + +namespace Luax +{ + + class LuaxState + { + public: + LuaxState(lua_State* state); + ~LuaxState(); + + operator lua_State*(); + operator bool(); + inline lua_State* operator ->() { return mState; }; + inline lua_State& operator *() { return *mState; }; + + private: + void* operator new(size_t size); + + lua_State* mState; + + }; + +} + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0