@@ -677,11 +677,11 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
677
677
/* }}} */
678
678
679
679
/* {{{ curl_progress */
680
- static size_t curl_progress (void * clientp , double dltotal , double dlnow , double ultotal , double ulnow )
680
+ static int curl_progress (void * clientp , double dltotal , double dlnow , double ultotal , double ulnow )
681
681
{
682
682
php_curl * ch = (php_curl * )clientp ;
683
683
php_curl_callback * t = ch -> handlers .progress ;
684
- size_t rval = 0 ;
684
+ int rval = 0 ;
685
685
686
686
#if PHP_CURL_DEBUG
687
687
fprintf (stderr , "curl_progress() called\n" );
@@ -726,11 +726,11 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
726
726
727
727
#if LIBCURL_VERSION_NUM >= 0x072000
728
728
/* {{{ curl_xferinfo */
729
- static size_t curl_xferinfo (void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow )
729
+ static int curl_xferinfo (void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow )
730
730
{
731
731
php_curl * ch = (php_curl * )clientp ;
732
732
php_curl_callback * t = ch -> handlers .xferinfo ;
733
- size_t rval = 0 ;
733
+ int rval = 0 ;
734
734
735
735
#if PHP_CURL_DEBUG
736
736
fprintf (stderr , "curl_xferinfo() called\n" );
@@ -1154,8 +1154,8 @@ static void _php_curl_set_default_options(php_curl *ch)
1154
1154
{
1155
1155
char * cainfo ;
1156
1156
1157
- curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS , 1 );
1158
- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0 );
1157
+ curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS , 1L );
1158
+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0L );
1159
1159
curl_easy_setopt (ch -> cp , CURLOPT_ERRORBUFFER , ch -> err .str );
1160
1160
curl_easy_setopt (ch -> cp , CURLOPT_WRITEFUNCTION , curl_write );
1161
1161
curl_easy_setopt (ch -> cp , CURLOPT_FILE , (void * ) ch );
@@ -1164,10 +1164,10 @@ static void _php_curl_set_default_options(php_curl *ch)
1164
1164
curl_easy_setopt (ch -> cp , CURLOPT_HEADERFUNCTION , curl_write_header );
1165
1165
curl_easy_setopt (ch -> cp , CURLOPT_WRITEHEADER , (void * ) ch );
1166
1166
#ifndef ZTS
1167
- curl_easy_setopt (ch -> cp , CURLOPT_DNS_USE_GLOBAL_CACHE , 1 );
1167
+ curl_easy_setopt (ch -> cp , CURLOPT_DNS_USE_GLOBAL_CACHE , 1L );
1168
1168
#endif
1169
- curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120 );
1170
- curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20 ); /* prevent infinite redirects */
1169
+ curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120L );
1170
+ curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20L ); /* prevent infinite redirects */
1171
1171
1172
1172
cainfo = INI_STR ("openssl.cafile" );
1173
1173
if (!(cainfo && cainfo [0 ] != '\0' )) {
@@ -2278,7 +2278,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
2278
2278
/* no need to build the mime structure for empty hashtables;
2279
2279
also works around https://github.com/curl/curl/issues/6455 */
2280
2280
curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDS , "" );
2281
- error = curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0 );
2281
+ error = curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0L );
2282
2282
} else {
2283
2283
return build_mime_structure_from_hash (ch , zvalue );
2284
2284
}
@@ -2371,7 +2371,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
2371
2371
2372
2372
case CURLOPT_POSTREDIR :
2373
2373
lval = zval_get_long (zvalue );
2374
- error = curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , lval & CURL_REDIR_POST_ALL );
2374
+ error = curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , ( long ) ( lval & CURL_REDIR_POST_ALL ) );
2375
2375
break ;
2376
2376
2377
2377
/* the following options deal with files, therefore the open_basedir check
@@ -2406,11 +2406,11 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
2406
2406
if (zend_is_true (zvalue )) {
2407
2407
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , curl_debug );
2408
2408
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , (void * )ch );
2409
- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1 );
2409
+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1L );
2410
2410
} else {
2411
2411
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , NULL );
2412
2412
curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , NULL );
2413
- curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0 );
2413
+ curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0L );
2414
2414
}
2415
2415
break ;
2416
2416
0 commit comments