From: Michael Wallner Date: Tue, 3 May 2005 09:35:36 +0000 (+0000) Subject: - unroll loop X-Git-Tag: RELEASE_0_8_0~37 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=81a242054e9c75651ef3d2fd9e9ea836517c92aa;p=m6w6%2Fext-http - unroll loop # if there's a smarter way I'd appreciate a hint :) --- diff --git a/http_curl_api.c b/http_curl_api.c index 15b16e5..9fc04fb 100644 --- a/http_curl_api.c +++ b/http_curl_api.c @@ -115,13 +115,13 @@ static size_t http_curl_write_callback(char *buf, size_t len, size_t n, void *s) /* {{{ 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); @@ -134,7 +134,6 @@ static int http_curl_progress_callback(void *data, double dltotal, double 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(); @@ -146,7 +145,7 @@ static int http_curl_debug_callback(CURL *ch, curl_infotype type, char *string, 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)