diff options
author | chai <chaifix@163.com> | 2019-03-29 22:28:40 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-29 22:28:40 +0800 |
commit | 157530b8b6e11efc5573d5a0db8987a440197aa1 (patch) | |
tree | f9df79c013885e13dc81e7046c9828037eb29e2e /source/3rd-party/Luax/luax_state.cpp | |
parent | e37b1dfd022bda4dfdcba243c0543c62c89db32f (diff) |
*misc
Diffstat (limited to 'source/3rd-party/Luax/luax_state.cpp')
-rw-r--r-- | source/3rd-party/Luax/luax_state.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/3rd-party/Luax/luax_state.cpp b/source/3rd-party/Luax/luax_state.cpp index b4d989a..3eae1df 100644 --- a/source/3rd-party/Luax/luax_state.cpp +++ b/source/3rd-party/Luax/luax_state.cpp @@ -1,8 +1,8 @@ -//#include "luax_class.h" #include "luax_enum.h" #include "luax_state.h" #include "luax_vm.h" #include "luax_class.hpp" +#include "luax_internal.h" namespace Luax { @@ -28,6 +28,16 @@ namespace Luax luaL_openlibs(mState); } + global_State* LuaxState::GetGlobalState() + { + return G(mState); + } + + LuaxVM* LuaxState::GetVM() + { + return LuaxVM::TryGetVM(G(mState)); + } + void LuaxState::PushGlobalNamespace() { int top = GetTop(); @@ -642,8 +652,8 @@ namespace Luax return value; } - void LuaxState::PushPtrUserdata(void* ptr) { - + void LuaxState::PushPtrUserdata(void* ptr) + { void** handle = (void**)lua_newuserdata(this->mState, sizeof(void*)); assert(handle); (*handle) = ptr; |