summaryrefslogtreecommitdiff
path: root/ext/curl/multi.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-19 08:07:31 +0200
committerAnatol Belski <ab@php.net>2014-08-19 08:07:31 +0200
commit63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc (patch)
treee561a58d6e084c5e4cbdde1f84aed16cf4724383 /ext/curl/multi.c
parent1e8273964fbd517a2eb9e560f9cdb4afffa0c034 (diff)
downloadphp-git-63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc.tar.gz
basic macro replacements, all at once
Diffstat (limited to 'ext/curl/multi.c')
-rw-r--r--ext/curl/multi.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 5550972bba..58c33c141c 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -92,7 +92,7 @@ PHP_FUNCTION(curl_multi_add_handle)
zend_llist_add_element(&mh->easyh, &tmp_val);
- RETURN_LONG((long)curl_multi_add_handle(mh->multi, ch->cp));
+ RETURN_INT((long)curl_multi_add_handle(mh->multi, ch->cp));
}
/* }}} */
@@ -140,7 +140,7 @@ PHP_FUNCTION(curl_multi_remove_handle)
ZEND_FETCH_RESOURCE(mh, php_curlm *, z_mh, -1, le_curl_multi_handle_name, le_curl_multi_handle);
ZEND_FETCH_RESOURCE(ch, php_curl *, z_ch, -1, le_curl_name, le_curl);
- RETVAL_LONG((long)curl_multi_remove_handle(mh->multi, ch->cp));
+ RETVAL_INT((long)curl_multi_remove_handle(mh->multi, ch->cp));
zend_llist_del_element(&mh->easyh, &z_ch, (int (*)(void *, void *))curl_compare_resources);
}
@@ -183,9 +183,9 @@ PHP_FUNCTION(curl_multi_select)
curl_multi_fdset(mh->multi, &readfds, &writefds, &exceptfds, &maxfd);
if (maxfd == -1) {
- RETURN_LONG(-1);
+ RETURN_INT(-1);
}
- RETURN_LONG(select(maxfd + 1, &readfds, &writefds, &exceptfds, &to));
+ RETURN_INT(select(maxfd + 1, &readfds, &writefds, &exceptfds, &to));
}
/* }}} */
@@ -218,12 +218,12 @@ PHP_FUNCTION(curl_multi_exec)
}
}
- convert_to_long_ex(z_still_running);
- still_running = Z_LVAL_P(z_still_running);
+ convert_to_int_ex(z_still_running);
+ still_running = Z_IVAL_P(z_still_running);
result = curl_multi_perform(mh->multi, &still_running);
- ZVAL_LONG(z_still_running, still_running);
+ ZVAL_INT(z_still_running, still_running);
- RETURN_LONG(result);
+ RETURN_INT(result);
}
/* }}} */
@@ -271,12 +271,12 @@ PHP_FUNCTION(curl_multi_info_read)
}
if (zmsgs_in_queue) {
zval_dtor(zmsgs_in_queue);
- ZVAL_LONG(zmsgs_in_queue, queued_msgs);
+ ZVAL_INT(zmsgs_in_queue, queued_msgs);
}
array_init(return_value);
- add_assoc_long(return_value, "msg", tmp_msg->msg);
- add_assoc_long(return_value, "result", tmp_msg->data.result);
+ add_assoc_int(return_value, "msg", tmp_msg->msg);
+ add_assoc_int(return_value, "result", tmp_msg->data.result);
/* find the original easy curl handle */
{
@@ -386,8 +386,8 @@ static int _php_curl_multi_setopt(php_curlm *mh, long option, zval *zvalue, zval
#if LIBCURL_VERSION_NUM >= 0x071003 /* 7.16.3 */
case CURLMOPT_MAXCONNECTS:
#endif
- convert_to_long_ex(zvalue);
- error = curl_multi_setopt(mh->multi, option, Z_LVAL_P(zvalue));
+ convert_to_int_ex(zvalue);
+ error = curl_multi_setopt(mh->multi, option, Z_IVAL_P(zvalue));
break;
default: