예제 #1
0
void CLuaRules::LoadHandler()
{
	//FIXME GML: this needs a mutex!!!
	if (luaRules != NULL) {
		return;
	}

	luaRules = new CLuaRules();

	if (!luaRules->IsValid()) {
		FreeHandler();
	}
}
예제 #2
0
파일: LuaIntro.cpp 프로젝트: 9heart/spring
void CLuaIntro::LoadHandler()
{
	{
		std::lock_guard<boost::mutex> lk(m_singleton);
		if (LuaIntro) return;

		LuaIntro = new CLuaIntro();
	}

	if (!LuaIntro->IsValid()) {
		FreeHandler();
	}
}
예제 #3
0
파일: LuaGaia.cpp 프로젝트: AMDmi3/spring
void CLuaGaia::LoadHandler()
{
	//FIXME GML: this needs a mutex!!!

	if (luaGaia != NULL) {
		return;
	}

	luaGaia = new CLuaGaia();

	if (!luaGaia->IsValid()) {
		FreeHandler();
	}
}
예제 #4
0
//Removes a Connection from doubly linked list.
struct ConnectionNode *RemoveConnection(struct ConnectionNode *rm) {
	struct ConnectionNode *r;
	if (rm == rm->prev) {
		if (rm == connections_head)
			connections_head = NULL;
		free(rm);
		return NULL ;
	}
	rm->prev->next = rm->next;
	rm->next->prev = rm->prev;
	if (connections_head == rm)
		connections_head = rm->next;
	r = rm->prev;

	FreeHandler(rm->handler);
	free(rm);
	return r;
}
예제 #5
0
void FreeHandler(struct ConnectionNodeHandler *x) {
	if(x->prev != NULL)
		FreeHandler(x->prev);
	x->free(x);
}