summaryrefslogtreecommitdiff
path: root/Source/3rdParty/Luax/luax_context.cpp
blob: d41c24f3e726718cf84f647268f3376ca9228374 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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");
	}

}