예제 #1
0
파일: IoMySQL.c 프로젝트: cdcarter/io
IoObject* IoMySQL_close(IoObject* self, IoObject* locals, IoMessage* m) {
	/*#io
	docSlot("close",
		   "Closes a previously opened connection.")
	*/

	if(DATA(self)->connected)
		mysql_close(&DATA(self)->connection);

	IoObject_removeSlot_(self, IOSYMBOL("host"));
	IoObject_removeSlot_(self, IOSYMBOL("user"));
	IoObject_removeSlot_(self, IOSYMBOL("password"));
	IoObject_removeSlot_(self, IOSYMBOL("database"));
	IoObject_removeSlot_(self, IOSYMBOL("port"));
	IoObject_removeSlot_(self, IOSYMBOL("socket"));
	IoObject_removeSlot_(self, IOSYMBOL("usingSSL"));

	return self;
}
예제 #2
0
파일: IoCoroutine.c 프로젝트: jdp/io
void IoCoroutine_rawRemoveException(IoCoroutine *self)
{
	IoObject_removeSlot_(self, IOSYMBOL("exception"));
}