diff options
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; |