summaryrefslogtreecommitdiff
path: root/source/3rd-party/Luax/luax_vm.cpp
blob: 4257b4d5f341b21271f91702a0293a80bb61e3ab (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_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");
	}

}