diff options
author | chai <chaifix@163.com> | 2018-12-07 20:16:33 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-12-07 20:16:33 +0800 |
commit | a059088c90fafb9ef21840db338f6bd04023b096 (patch) | |
tree | 00d2a75f1237011209fe79f3422da9fcb8e39b53 /src/luax_state.h | |
parent | f065d7884d353c3545535850e4e8bdf8e10025ca (diff) |
Diffstat (limited to 'src/luax_state.h')
-rw-r--r-- | src/luax_state.h | 27 |
1 files changed, 27 insertions, 0 deletions
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 |