From 1497dccd63a84b7ee2b229b1ad9c5c02718f2a78 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 19 Mar 2019 23:06:27 +0800 Subject: *rename --- source/3rd-party/Luax/luax_context.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 source/3rd-party/Luax/luax_context.cpp (limited to 'source/3rd-party/Luax/luax_context.cpp') diff --git a/source/3rd-party/Luax/luax_context.cpp b/source/3rd-party/Luax/luax_context.cpp new file mode 100644 index 0000000..d41c24f --- /dev/null +++ b/source/3rd-party/Luax/luax_context.cpp @@ -0,0 +1,29 @@ +#include "luax_context.h" + +namespace Luax +{ + + LuaxContext::LuaxContext(lua_State* L) + : state(L) + { + assert(state); + } + + LuaxContext::~LuaxContext() + { + } + + // ³õʼ»¯context + void LuaxContext::Setup() + { + SetupRefTables(); + } + + void LuaxContext::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