From: Jani Taskinen Date: Tue, 21 Jul 2009 23:06:18 +0000 (+0000) Subject: - PHP_5_2 branch does not have these macros X-Git-Tag: php-5.2.11RC1~122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad6945538c0b84b95c521d9efbf8a0f1db3c1575;p=php - PHP_5_2 branch does not have these macros --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index b318baab8b..6b84e5330c 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1260,7 +1260,7 @@ PHP_FUNCTION(curl_copy_handle) zend_llist_copy(&dupch->to_free.post, &ch->to_free.post); /* Keep track of cloned copies to avoid invoking curl destructors for every clone */ - Z_ADDREF_P(ch->clone); + ch->clone->refcount++; dupch->clone = ch->clone; ZEND_REGISTER_RESOURCE(return_value, dupch, le_curl); @@ -2083,12 +2083,12 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC) #endif /* cURL destructors should be invoked only by last curl handle */ - if (Z_REFCOUNT_P(ch->clone) <= 1) { + if (ch->clone->refcount <= 1) { zend_llist_clean(&ch->to_free.slist); zend_llist_clean(&ch->to_free.post); zval_ptr_dtor(&ch->clone); } else { - Z_DELREF_P(ch->clone); + ch->clone->refcount--; ch->to_free.slist.dtor = NULL; ch->to_free.post.dtor = NULL; zend_llist_clean(&ch->to_free.slist);