diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-10-27 01:28:58 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-10-27 01:28:58 +0300 |
commit | 49ea143bbd8d0bfcd393d0b5308a5d7833fc087c (patch) | |
tree | 071b08e8067e5a6a1e9726e3d76dfe81cc42d6b0 /ext/soap/php_http.c | |
parent | 1ab0d820dabc612b7d371d6ed524f60f68101d0f (diff) | |
download | php-git-49ea143bbd8d0bfcd393d0b5308a5d7833fc087c.tar.gz |
Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r-- | ext/soap/php_http.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index d8d8f95f2b..5315a3e0be 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -519,7 +519,7 @@ try_again: if (stream) { php_stream_auto_cleanup(stream); add_property_resource(this_ptr, "httpsocket", stream->res); - GC_REFCOUNT(stream->res)++; + GC_ADDREF(stream->res); add_property_long(this_ptr, "_use_proxy", use_proxy); } else { php_url_free(phpurl); @@ -539,7 +539,7 @@ try_again: zend_resource *ret = zend_register_resource(phpurl, le_url); add_property_resource(this_ptr, "httpurl", ret); - GC_REFCOUNT(ret)++; + GC_ADDREF(ret); /*zend_list_addref(ret);*/ if (context && @@ -1014,7 +1014,7 @@ try_again: } if (!zend_hash_index_exists(Z_ARRVAL(zcookie), 2)) { add_index_str(&zcookie, 2, phpurl->host); - GC_REFCOUNT(phpurl->host)++; + GC_ADDREF(phpurl->host); } zend_symtable_update(Z_ARRVAL_P(cookies), name.s, &zcookie); |