From 2fb6b09dcf2ceb09cf021adb4a89f4c1255d5558 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 13 Jan 2019 09:36:13 +0800 Subject: +luax --- Source/3rdParty/Luax/luax_state.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Source/3rdParty/Luax/luax_state.h (limited to 'Source/3rdParty/Luax/luax_state.h') diff --git a/Source/3rdParty/Luax/luax_state.h b/Source/3rdParty/Luax/luax_state.h new file mode 100644 index 0000000..7b6338f --- /dev/null +++ b/Source/3rdParty/Luax/luax_state.h @@ -0,0 +1,27 @@ +#ifndef __LUAX_STATE_H__ +#define __LUAX_STATE_H__ + +namespace Luax +{ + + class LuaxState + { + public: + LuaxState(lua_State* state) : mState(state){}; + ~LuaxState() {}; + + inline operator lua_State*() { return mState; }; + 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