예제 #1
0
파일: LuaPlus.cpp 프로젝트: brock7/TianLong
void LuaPlusGCFunction(void* s)
{
	GCState* st = (GCState*)s;
	LuaState* state = (LuaState*)lua_getstateuserdata(st->L);
	if (!state)
		return;

	LuaObject* curObj = state->GetHeadObject()->m_next;
	while (curObj != state->GetTailObject())
	{
		markobject(st, &curObj->m_object);
		curObj = curObj->m_next;		
	}
}
예제 #2
0
void LuaState::LuaPlusGCFunction(void* s)
{
	lua_State* L = (lua_State*)s;
	LuaState* state = (LuaState*)lua_getstateuserdata(L);
	if (!state)
		return;

    global_State* g = G(L);

	LuaObject* curObj = state->GetHeadObject()->m_next;
	while (curObj != (LuaObject*)state->GetTailObject())
	{
		markvalue(g, curObj->GetTObject());
		curObj = ((MiniLuaObject*)curObj)->m_next;
	}
}