From ad6945538c0b84b95c521d9efbf8a0f1db3c1575 Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Tue, 21 Jul 2009 23:06:18 +0000 Subject: [PATCH] - PHP_5_2 branch does not have these macros --- ext/curl/interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.50.1