From f4c338c63f3456a8eccd56c35e233843687d55be Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 29 Mar 2019 00:43:25 +0800 Subject: *thread --- source/3rd-party/Luax/luax_vm.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 source/3rd-party/Luax/luax_vm.cpp (limited to 'source/3rd-party/Luax/luax_vm.cpp') diff --git a/source/3rd-party/Luax/luax_vm.cpp b/source/3rd-party/Luax/luax_vm.cpp new file mode 100644 index 0000000..4257b4d --- /dev/null +++ b/source/3rd-party/Luax/luax_vm.cpp @@ -0,0 +1,29 @@ +#include "luax_vm.h" + +namespace Luax +{ + + LuaxVM::LuaxVM(lua_State* L) + : state(L) + { + assert(state); + } + + LuaxVM::~LuaxVM() + { + } + + // ³õʼ»¯context + void LuaxVM::Setup() + { + SetupRefTables(); + } + + void LuaxVM::SetupRefTables() + { + // strong refºÍ weak ref + strongRefTable.Init(state, "_LUAX_STRONGREF_TABLE"); + weakRefTable.Init(state, "_LUAX_WEAKREF_TABLE", "v"); + } + +} \ No newline at end of file -- cgit v1.1-26-g67d0