Esempio n. 1
0
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;		
	}
}
Esempio n. 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;
	}
}