示例#1
0
static void php_enchant_broker_free(zend_resource *rsrc) /* {{{ */
{
	if (rsrc->ptr) {
		enchant_broker *broker = (enchant_broker *)rsrc->ptr;
		if (broker) {
			if (broker->pbroker) {
				if (broker->dictcnt && broker->dict) {
					if (broker->dict) {
						int total;
						total = broker->dictcnt-1;
						do {
							if (broker->dict[total]) {
								enchant_dict *pdict = broker->dict[total];
								broker->dict[total] = NULL;
								zend_list_free(pdict->rsrc);
								efree(pdict);
							}
							total--;
						} while (total>=0);
					}
					efree(broker->dict);
					broker->dict = NULL;
				}
				enchant_broker_free(broker->pbroker);
			}
			efree(broker);
		}
	}
}
示例#2
0
static void ZEND_FASTCALL zend_resource_destroy_wrapper(zend_resource *res)
{
	zend_list_free(res);
}