/* {{{ static int http_curl_progress_callback(void *, double, double, double, double) */
static int http_curl_progress_callback(void *data, double dltotal, double dlnow, double ultotal, double ulnow)
{
- int i;
zval *params_pass[4], params_local[4], retval, *func = (zval *) data;
TSRMLS_FETCH();
- for (i = 0; i < 5; ++i) {
- params_pass[i] = ¶ms_local[i];
- }
+ params_pass[0] = ¶ms_local[0];
+ params_pass[1] = ¶ms_local[1];
+ params_pass[2] = ¶ms_local[2];
+ params_pass[3] = ¶ms_local[3];
ZVAL_DOUBLE(params_pass[0], dltotal);
ZVAL_DOUBLE(params_pass[1], dlnow);
static int http_curl_debug_callback(CURL *ch, curl_infotype type, char *string, size_t length, void *data)
{
- int i;
zval *params_pass[2], params_local[2], retval, *func = (zval *) data;
TSRMLS_FETCH();
call_user_function(EG(function_table), NULL, func, &retval, 2, params_pass TSRMLS_CC);
- return 0;
+ return 0;
}
/* {{{ static inline zval *http_curl_getopt(HashTable *, char *, size_t, int) */
static inline zval *_http_curl_getopt_ex(HashTable *options, char *key, size_t keylen, int type TSRMLS_DC)