-/* {{{ 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)
-{
- zval *params_pass[4], params_local[4], retval;
- HTTP_CURL_CALLBACK_DATA(data, zval *, func);
-
- 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);
- ZVAL_DOUBLE(params_pass[2], ultotal);
- ZVAL_DOUBLE(params_pass[3], ulnow);
-
- return call_user_function(EG(function_table), NULL, func, &retval, 4, params_pass TSRMLS_CC);
-}
-/* }}} */
-
-static int http_curl_debug_callback(CURL *ch, curl_infotype type, char *string, size_t length, void *data)
-{
- zval *params_pass[2], params_local[2], retval;
- HTTP_CURL_CALLBACK_DATA(data, zval *, func);
-
- params_pass[0] = ¶ms_local[0];
- params_pass[1] = ¶ms_local[1];
-
- ZVAL_LONG(params_pass[0], type);
- ZVAL_STRINGL(params_pass[1], string, length, 1);
-
- call_user_function(EG(function_table), NULL, func, &retval, 2, params_pass TSRMLS_CC);
-
- 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)
-{
- zval **zoption;
-
- if (!options || (SUCCESS != zend_hash_find(options, key, keylen, (void **) &zoption))) {
- return NULL;
- }
-
- if (Z_TYPE_PP(zoption) != type) {
- switch (type)
- {
- case IS_BOOL: convert_to_boolean_ex(zoption); break;
- case IS_LONG: convert_to_long_ex(zoption); break;
- case IS_DOUBLE: convert_to_double_ex(zoption); break;
- case IS_STRING: convert_to_string_ex(zoption); break;
- case IS_ARRAY: convert_to_array_ex(zoption); break;
- case IS_OBJECT: convert_to_object_ex(zoption); break;
- default:
- break;
- }
- }
-
- return *zoption;
-}
-/* }}} */