diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-07 12:28:51 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-11 15:49:06 +0100 |
commit | e219ec144ef6682b71e135fd18654ee1bb4676b4 (patch) | |
tree | e4a3ae2b619cdc9fe50ee8e1fa5adb99d804dddf /ext/curl/multi.c | |
parent | fe8fdfa3bd588d80ce60f6b3848058239e0a760f (diff) | |
download | php-git-e219ec144ef6682b71e135fd18654ee1bb4676b4.tar.gz |
Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2
This is a squash of PR #3734, which is a squash of PR #3313.
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
Diffstat (limited to 'ext/curl/multi.c')
-rw-r--r-- | ext/curl/multi.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c index cacda1aef4..1a891a4ebc 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -265,7 +265,7 @@ PHP_FUNCTION(curl_multi_exec) ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_RESOURCE(z_mh) - Z_PARAM_ZVAL_DEREF(z_still_running) + Z_PARAM_ZVAL(z_still_running) ZEND_PARSE_PARAMETERS_END(); if ((mh = (php_curlm *)zend_fetch_resource(Z_RES_P(z_mh), le_curl_multi_handle_name, le_curl_multi_handle)) == NULL) { @@ -290,8 +290,7 @@ PHP_FUNCTION(curl_multi_exec) still_running = zval_get_long(z_still_running); error = curl_multi_perform(mh->multi, &still_running); - zval_ptr_dtor(z_still_running); - ZVAL_LONG(z_still_running, still_running); + ZEND_TRY_ASSIGN_LONG(z_still_running, still_running); SAVE_CURLM_ERROR(mh, error); RETURN_LONG((zend_long) error); @@ -338,7 +337,7 @@ PHP_FUNCTION(curl_multi_info_read) ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_RESOURCE(z_mh) Z_PARAM_OPTIONAL - Z_PARAM_ZVAL_DEREF(zmsgs_in_queue) + Z_PARAM_ZVAL(zmsgs_in_queue) ZEND_PARSE_PARAMETERS_END(); if ((mh = (php_curlm *)zend_fetch_resource(Z_RES_P(z_mh), le_curl_multi_handle_name, le_curl_multi_handle)) == NULL) { @@ -349,9 +348,9 @@ PHP_FUNCTION(curl_multi_info_read) if (tmp_msg == NULL) { RETURN_FALSE; } + if (zmsgs_in_queue) { - zval_ptr_dtor(zmsgs_in_queue); - ZVAL_LONG(zmsgs_in_queue, queued_msgs); + ZEND_TRY_ASSIGN_LONG(zmsgs_in_queue, queued_msgs); } array_init(return_value); |