- get rid of 1001 strict-aliasing warnings
authorMichael Wallner <mike@php.net>
Tue, 28 Mar 2006 20:20:40 +0000 (20:20 +0000)
committerMichael Wallner <mike@php.net>
Tue, 28 Mar 2006 20:20:40 +0000 (20:20 +0000)
17 files changed:
http_api.c
http_cookie_api.c
http_filter_api.c
http_functions.c
http_headers_api.c
http_message_api.c
http_querystring_object.c
http_request_api.c
http_request_body_api.c
http_request_object.c
http_request_pool_api.c
http_response_object.c
http_send_api.c
php_http.h
php_http_message_api.h
php_http_std_defs.h
php_http_url_api.h

index 59466806a03e80b2bd0fd46aac0856ea9657e08f..c932266c5d38f75a5b315c26f76fdb3692459921 100644 (file)
@@ -201,10 +201,10 @@ PHP_HTTP_API zval *_http_get_server_var_ex(const char *key, size_t key_size, zen
 #ifdef ZEND_ENGINE_2
        zend_is_auto_global("_SERVER", lenof("_SERVER") TSRMLS_CC);
 #endif
-       if ((SUCCESS != zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &hsv)) || (Z_TYPE_PP(hsv) != IS_ARRAY)) {
+       if ((SUCCESS != zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void *) &hsv)) || (Z_TYPE_PP(hsv) != IS_ARRAY)) {
                return NULL;
        }
-       if ((SUCCESS != zend_hash_find(Z_ARRVAL_PP(hsv), (char *) key, key_size, (void **) &var)) || (Z_TYPE_PP(var) != IS_STRING)) {
+       if ((SUCCESS != zend_hash_find(Z_ARRVAL_PP(hsv), (char *) key, key_size, (void *) &var)) || (Z_TYPE_PP(var) != IS_STRING)) {
                return NULL;
        }
        if (check && !(Z_STRVAL_PP(var) && Z_STRLEN_PP(var))) {
index c216e2d3f035aeb8f2f52562eb41d77599e03508..fa6b2536e1bfe775e0a6e0741d88e9b44a006777 100644 (file)
@@ -66,7 +66,7 @@ PHP_HTTP_API void _http_cookie_list_free(http_cookie_list **list TSRMLS_DC)
 PHP_HTTP_API const char *_http_cookie_list_get_cookie(http_cookie_list *list, const char *name, size_t name_len TSRMLS_DC)
 {
        zval **cookie = NULL;
-       if ((SUCCESS != zend_hash_find(&list->cookies, (char *) name, name_len + 1, (void **) &cookie)) || (Z_TYPE_PP(cookie) != IS_STRING)) {
+       if ((SUCCESS != zend_hash_find(&list->cookies, (char *) name, name_len + 1, (void *) &cookie)) || (Z_TYPE_PP(cookie) != IS_STRING)) {
                return NULL;
        }
        return Z_STRVAL_PP(cookie);
@@ -75,7 +75,7 @@ PHP_HTTP_API const char *_http_cookie_list_get_cookie(http_cookie_list *list, co
 PHP_HTTP_API const char *_http_cookie_list_get_extra(http_cookie_list *list, const char *name, size_t name_len TSRMLS_DC)
 {
        zval **extra = NULL;
-       if ((SUCCESS != zend_hash_find(&list->extras, (char *) name, name_len + 1, (void **) &extra)) || (Z_TYPE_PP(extra) != IS_STRING)) {
+       if ((SUCCESS != zend_hash_find(&list->extras, (char *) name, name_len + 1, (void *) &extra)) || (Z_TYPE_PP(extra) != IS_STRING)) {
                return NULL;
        }
        return Z_STRVAL_PP(extra);
index 2553d681113728bbbe727deb95fc2c7b4ad91fe3..02467decdb2844570151a79883d83d10ad9a89ca 100644 (file)
@@ -484,7 +484,7 @@ static php_stream_filter *http_filter_create(const char *name, zval *params, int
                        {
                                case IS_ARRAY:
                                case IS_OBJECT:
-                                       if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void **) &tmp)) {
+                                       if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) {
                                                break;
                                        }
                                default:
index 04377f54ac12c34d94082d799a3916f4f3246b6e..aeb41da2482de0316695c67b340968ec4b0a52f3 100644 (file)
@@ -250,7 +250,7 @@ PHP_FUNCTION(http_build_str)
                zval **value; \
                 \
                zend_hash_internal_pointer_reset(Z_ARRVAL_P(supported)); \
-               if (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(supported), (void **) &value)) { \
+               if (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(supported), (void *) &value)) { \
                        RETVAL_ZVAL(*value, 1, 0); \
                } else { \
                        RETVAL_NULL(); \
@@ -1206,7 +1206,7 @@ PHP_FUNCTION(http_match_request_header)
                zval **bodyonly; \
                 \
                /* check if only the body should be returned */ \
-               if (options && (SUCCESS == zend_hash_find(Z_ARRVAL_P(options), "bodyonly", sizeof("bodyonly"), (void **) &bodyonly)) && zval_is_true(*bodyonly)) { \
+               if (options && (SUCCESS == zend_hash_find(Z_ARRVAL_P(options), "bodyonly", sizeof("bodyonly"), (void *) &bodyonly)) && zval_is_true(*bodyonly)) { \
                        http_message *msg = http_message_parse(PHPSTR_VAL(&request.conv.response), PHPSTR_LEN(&request.conv.response)); \
                         \
                        if (msg) { \
index c26214592b02420628e66defb06a6c5fec29b03b..c778662f5f2029cd36760c883e7fd98512882bc2 100644 (file)
@@ -392,7 +392,7 @@ PHP_HTTP_API STATUS _http_parse_headers_ex(const char *header, HashTable *header
                                                        }
 
                                                        /* if we already have got such a header make an array of those */
-                                                       if (SUCCESS == zend_hash_find(headers, key, keylen + 1, (void **) &previous)) {
+                                                       if (SUCCESS == zend_hash_find(headers, key, keylen + 1, (void *) &previous)) {
                                                                /* convert to array */
                                                                if (Z_TYPE_PP(previous) != IS_ARRAY) {
                                                                        convert_to_array(*previous);
@@ -429,7 +429,7 @@ PHP_HTTP_API void _http_get_request_headers_ex(HashTable *headers, zend_bool pre
 #ifdef ZEND_ENGINE_2
        zend_is_auto_global("_SERVER", lenof("_SERVER") TSRMLS_CC);
 #endif
-       if (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &hsv)) {
+       if (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void *) &hsv)) {
                FOREACH_KEYLEN(pos, *hsv, key, keylen, idx) {
                        if (key && keylen > 6 && !strncmp(key, "HTTP_", 5)) {
                                zval **header, *orig;
@@ -440,7 +440,7 @@ PHP_HTTP_API void _http_get_request_headers_ex(HashTable *headers, zend_bool pre
                                        key = pretty_key(estrndup(key, keylen), keylen, 1, 1);
                                }
        
-                               zend_hash_get_current_data_ex(Z_ARRVAL_PP(hsv), (void **) &header, &pos);
+                               zend_hash_get_current_data_ex(Z_ARRVAL_PP(hsv), (void *) &header, &pos);
                                
                                orig = *header;
                                convert_to_string_ex(header);
@@ -474,7 +474,7 @@ PHP_HTTP_API zend_bool _http_match_request_header_ex(const char *header, const c
        zend_hash_init(&headers, 0, NULL, ZVAL_PTR_DTOR, 0);
        http_get_request_headers_ex(&headers, 1);
 
-       if (SUCCESS == zend_hash_find(&headers, name, name_len+1, (void **) &data)) {
+       if (SUCCESS == zend_hash_find(&headers, name, name_len+1, (void *) &data)) {
                result = (match_case ? strcmp(Z_STRVAL_PP(data), value) : strcasecmp(Z_STRVAL_PP(data), value)) ? 0 : 1;
        }
        zend_hash_destroy(&headers);
index 402d3dd4ea8e782eebe526ce121defcd42b80994..59fb327f25acc9276547b6270a7de834d5395b0d 100644 (file)
@@ -137,7 +137,7 @@ PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char
 
        msg = http_message_init_rel(msg, 0);
 
-       if (SUCCESS != http_parse_headers_cb(message, &msg->hdrs, 1, (http_info_callback) http_message_info_callback, (void **) &msg)) {
+       if (SUCCESS != http_parse_headers_cb(message, &msg->hdrs, 1, (http_info_callback) http_message_info_callback, (void *) &msg)) {
                if (free_msg) {
                        http_message_free(&msg);
                }
@@ -250,7 +250,7 @@ PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char
                                ZVAL_ADDREF(c);
                                zend_hash_add(&msg->hdrs, "X-Original-Content-Encoding", sizeof("X-Original-Content-Encoding"), (void *) &c, sizeof(zval *), NULL);
                                zend_hash_del(&msg->hdrs, "Content-Encoding", sizeof("Content-Encoding"));
-                               if (SUCCESS == zend_hash_find(&msg->hdrs, "Content-Length", sizeof("Content-Length"), (void **) &original_len)) {
+                               if (SUCCESS == zend_hash_find(&msg->hdrs, "Content-Length", sizeof("Content-Length"), (void *) &original_len)) {
                                        ZVAL_ADDREF(*original_len);                                     
                                        zend_hash_add(&msg->hdrs, "X-Original-Content-Length", sizeof("X-Original-Content-Length"), (void *) original_len, sizeof(zval *), NULL);
                                        zend_hash_update(&msg->hdrs, "Content-Length", sizeof("Content-Length"), (void *) &len, sizeof(zval *), NULL);
@@ -528,7 +528,7 @@ PHP_HTTP_API STATUS _http_message_send(http_message *message TSRMLS_DC)
                        add_assoc_zval(&options, "headers", &headers);
 
                        /* check host header */
-                       if (SUCCESS == zend_hash_find(&message->hdrs, "Host", sizeof("Host"), (void **) &zhost)) {
+                       if (SUCCESS == zend_hash_find(&message->hdrs, "Host", sizeof("Host"), (void *) &zhost)) {
                                char *colon = NULL;
                                php_url parts, *url = php_url_parse(message->http.info.request.url);
                                
index d47c495d30ab2513380996e4f82ca728b97f7f4f..55d355d8e480bc6840de2d2c74aaf11c61717020 100644 (file)
@@ -295,7 +295,7 @@ static inline int _http_querystring_modify_array_ex(zval *qarray, char *key, int
        }
        
        /* update */
-       if (SUCCESS == zend_hash_find(Z_ARRVAL_P(qarray), key, keylen, (void **) &qarray_entry)) {
+       if (SUCCESS == zend_hash_find(Z_ARRVAL_P(qarray), key, keylen, (void *) &qarray_entry)) {
                zval equal;
                
                /* recursive */
@@ -370,7 +370,7 @@ static inline void _http_querystring_get(zval *this_ptr, int type, char *name, u
 {
        zval **arrval, *qarray = GET_PROP(queryArray);
                
-       if ((Z_TYPE_P(qarray) == IS_ARRAY) && (SUCCESS == zend_hash_find(Z_ARRVAL_P(qarray), name, name_len + 1, (void **) &arrval))) {
+       if ((Z_TYPE_P(qarray) == IS_ARRAY) && (SUCCESS == zend_hash_find(Z_ARRVAL_P(qarray), name, name_len + 1, (void *) &arrval))) {
                RETVAL_ZVAL(*arrval, 1, 0);
                
                if (type) {
@@ -404,15 +404,15 @@ PHP_METHOD(HttpQueryString, __construct)
 #ifdef ZEND_ENGINE_2
                        zend_is_auto_global("_SERVER", lenof("_SERVER") TSRMLS_CC);
 #endif
-                       if (    (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &_SERVER)) &&
+                       if (    (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void *) &_SERVER)) &&
                                        (Z_TYPE_PP(_SERVER) == IS_ARRAY) &&
-                                       (SUCCESS == zend_hash_find(Z_ARRVAL_PP(_SERVER), "QUERY_STRING", sizeof("QUERY_STRING"), (void **) &QUERY_STRING))) {
+                                       (SUCCESS == zend_hash_find(Z_ARRVAL_PP(_SERVER), "QUERY_STRING", sizeof("QUERY_STRING"), (void *) &QUERY_STRING))) {
                                
                                qstring = *QUERY_STRING;
 #ifdef ZEND_ENGINE_2
                                zend_is_auto_global("_GET", lenof("_GET") TSRMLS_CC);
 #endif
-                               if ((SUCCESS == zend_hash_find(&EG(symbol_table), "_GET", sizeof("_GET"), (void **) &_GET)) && (Z_TYPE_PP(_GET) == IS_ARRAY)) {
+                               if ((SUCCESS == zend_hash_find(&EG(symbol_table), "_GET", sizeof("_GET"), (void *) &_GET)) && (Z_TYPE_PP(_GET) == IS_ARRAY)) {
                                        qarray = *_GET;
                                } else {
                                        http_error(HE_WARNING, HTTP_E_QUERYSTRING, "Could not acquire reference to superglobal GET array");
@@ -556,7 +556,7 @@ PHP_METHOD(HttpQueryString, singleton)
                zval **zobj_ptr = NULL, *zobj = NULL;
                
                if (Z_TYPE_P(instance) == IS_ARRAY) {
-                       if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(instance), global, (void **) &zobj_ptr)) {
+                       if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(instance), global, (void *) &zobj_ptr)) {
                                RETVAL_ZVAL(*zobj_ptr, 1, 0);
                        } else {
                                zobj = http_querystring_instantiate(global);
index a1779aa2587ae216a111ec06a941d0d130cb95d2..06b69f719e8039b72788da31a6f3043417258dca 100644 (file)
@@ -560,9 +560,9 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti
                        zval **prs, **pre;
                        
                        zend_hash_internal_pointer_reset(Z_ARRVAL_P(zoption));
-                       if (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(zoption), (void **) &prs)) {
+                       if (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(zoption), (void *) &prs)) {
                                zend_hash_move_forward(Z_ARRVAL_P(zoption));
-                               if (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(zoption), (void **) &pre)) {
+                               if (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(zoption), (void *) &pre)) {
                                        zval *prs_cpy = zval_copy(IS_LONG, *prs), *pre_cpy = zval_copy(IS_LONG, *pre);
                                        
                                        if (Z_LVAL_P(prs_cpy) && Z_LVAL_P(pre_cpy)) {
@@ -629,9 +629,9 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti
                FOREACH_VAL(pos1, zoption, rr) {
                        if (Z_TYPE_PP(rr) == IS_ARRAY) {
                                zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(rr), &pos2);
-                               if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(rr), (void **) &rb, &pos2)) {
+                               if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(rr), (void *) &rb, &pos2)) {
                                        zend_hash_move_forward_ex(Z_ARRVAL_PP(rr), &pos2);
-                                       if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(rr), (void **) &re, &pos2)) {
+                                       if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(rr), (void *) &re, &pos2)) {
                                                if (    ((Z_TYPE_PP(rb) == IS_LONG) || ((Z_TYPE_PP(rb) == IS_STRING) && is_numeric_string(Z_STRVAL_PP(rb), Z_STRLEN_PP(rb), NULL, NULL, 1))) &&
                                                                ((Z_TYPE_PP(re) == IS_LONG) || ((Z_TYPE_PP(re) == IS_STRING) && is_numeric_string(Z_STRVAL_PP(re), Z_STRLEN_PP(re), NULL, NULL, 1)))) {
                                                        zval *rbl = zval_copy(IS_LONG, *rb), *rel = zval_copy(IS_LONG, *re);
@@ -673,7 +673,7 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti
                FOREACH_KEY(pos, zoption, header_key, header_idx) {
                        if (header_key) {
                                zval **header_val;
-                               if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(zoption), (void **) &header_val, &pos)) {
+                               if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(zoption), (void *) &header_val, &pos)) {
                                        char header[1024] = {0};
                                        
                                        ZVAL_ADDREF(*header_val);
@@ -741,7 +741,7 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti
                                FOREACH_KEY(pos, zoption, cookie_key, cookie_idx) {
                                        if (cookie_key) {
                                                zval **cookie_val;
-                                               if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(zoption), (void **) &cookie_val, &pos)) {
+                                               if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(zoption), (void *) &cookie_val, &pos)) {
                                                        zval *val = zval_copy(IS_STRING, *cookie_val);
                                                        phpstr_appendf(&request->_cache.cookies, "%s=%s; ", cookie_key, Z_STRVAL_P(val));
                                                        zval_free(&val);
@@ -1105,9 +1105,9 @@ static inline zval *_http_request_option_ex(http_request *r, HashTable *options,
        
        if (!options || 
 #ifdef ZEND_ENGINE_2
-                       (SUCCESS != zend_hash_quick_find(options, key, keylen, h, (void **) &zoption))
+                       (SUCCESS != zend_hash_quick_find(options, key, keylen, h, (void *) &zoption))
 #else
-                       (SUCCESS != zend_hash_find(options, key, keylen, (void **) &zoption))
+                       (SUCCESS != zend_hash_find(options, key, keylen, (void *) &zoption))
 #endif
        ) {
                return NULL;
index dd76edb47053b18d52b03499464f72f08059b43b..fcaa635d00f54603a9ba1c820aa944e70427cef1 100644 (file)
@@ -85,9 +85,9 @@ PHP_HTTP_API http_request_body *_http_request_body_fill(http_request_body *body,
                        
                        if (Z_TYPE_PP(data) != IS_ARRAY) {
                                http_error(HE_NOTICE, HTTP_E_INVALID_PARAM, "Unrecognized type of post file array entry");
-                       } else if (     SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "name", sizeof("name"), (void **) &name) ||
-                                               SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void **) &type) ||
-                                               SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "file", sizeof("file"), (void **) &file)) {
+                       } else if (     SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "name", sizeof("name"), (void *) &name) ||
+                                               SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void *) &type) ||
+                                               SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "file", sizeof("file"), (void *) &file)) {
                                http_error(HE_NOTICE, HTTP_E_INVALID_PARAM, "Post file array entry misses either 'name', 'type' or 'file' entry");
                        } else {
                                CURLcode err;
index 7791d4c1c1fdf49bd532654b286b0a9d07d1653e..047e2a34c13cda697627693b43636e017bd37bbc 100644 (file)
@@ -459,12 +459,12 @@ static inline void _http_request_object_check_request_content_type(zval *this_pt
                zval **headers, *opts = GET_PROP(options);
                
                if (    (Z_TYPE_P(opts) == IS_ARRAY) &&
-                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), "headers", sizeof("headers"), (void **) &headers)) && 
+                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), "headers", sizeof("headers"), (void *) &headers)) && 
                                (Z_TYPE_PP(headers) == IS_ARRAY)) {
                        zval **ct_header;
                        
                        /* only override if not already set */
-                       if ((SUCCESS != zend_hash_find(Z_ARRVAL_PP(headers), "Content-Type", sizeof("Content-Type"), (void **) &ct_header))) {
+                       if ((SUCCESS != zend_hash_find(Z_ARRVAL_PP(headers), "Content-Type", sizeof("Content-Type"), (void *) &ct_header))) {
                                add_assoc_stringl(*headers, "Content-Type", Z_STRVAL_P(ctype), Z_STRLEN_P(ctype), 1);
                        } else
                        /* or not a string, zero length string or a string of spaces */
@@ -580,7 +580,7 @@ STATUS _http_request_object_requesthandler(http_request_object *obj, zval *this_
                        zval **entry, *pcb;
                        
                        if (    (Z_TYPE_P(options) != IS_ARRAY)
-                               ||      (SUCCESS != zend_hash_find(Z_ARRVAL_P(options), "onprogress", sizeof("onprogress"), (void **) &entry)
+                               ||      (SUCCESS != zend_hash_find(Z_ARRVAL_P(options), "onprogress", sizeof("onprogress"), (void *) &entry)
                                ||      (!zval_is_true(*entry)))) {
                                MAKE_STD_ZVAL(pcb);
                                array_init(pcb);
@@ -728,7 +728,7 @@ static inline void _http_request_object_set_options_subr(INTERNAL_FUNCTION_PARAM
        if (prettify_keys && opts) {
                zend_hash_apply_with_arguments(Z_ARRVAL_P(opts), apply_pretty_key, 0);
        }
-       if (SUCCESS == zend_hash_find(Z_ARRVAL_P(new_opts), key, len, (void **) &entry)) {
+       if (SUCCESS == zend_hash_find(Z_ARRVAL_P(new_opts), key, len, (void *) &entry)) {
                if (overwrite) {
                        zend_hash_clean(Z_ARRVAL_PP(entry));
                }
@@ -762,7 +762,7 @@ static inline void _http_request_get_options_subr(INTERNAL_FUNCTION_PARAMETERS,
                array_init(return_value);
 
                if (    (Z_TYPE_P(opts) == IS_ARRAY) && 
-                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), key, len, (void **) &options))) {
+                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), key, len, (void *) &options))) {
                        convert_to_array(*options);
                        array_copy(*options, return_value);
                }
@@ -1647,11 +1647,11 @@ PHP_METHOD(HttpRequest, getResponseHeader)
 
                data = GET_PROP(responseData);
                if (    (Z_TYPE_P(data) == IS_ARRAY) && 
-                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(data), "headers", sizeof("headers"), (void **) &headers)) &&
+                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(data), "headers", sizeof("headers"), (void *) &headers)) &&
                                (Z_TYPE_PP(headers) == IS_ARRAY)) {
                        if (!header_len || !header_name) {
                                RETVAL_ZVAL(*headers, 1, 0);
-                       } else if (SUCCESS == zend_hash_find(Z_ARRVAL_PP(headers), pretty_key(header_name, header_len, 1, 1), header_len + 1, (void **) &header)) {
+                       } else if (SUCCESS == zend_hash_find(Z_ARRVAL_PP(headers), pretty_key(header_name, header_len, 1, 1), header_len + 1, (void *) &header)) {
                                RETVAL_ZVAL(*header, 1, 0);
                        } else {
                                RETVAL_FALSE;
@@ -1684,7 +1684,7 @@ PHP_METHOD(HttpRequest, getResponseCookies)
 
                data = GET_PROP(responseData);
                if (    (Z_TYPE_P(data) == IS_ARRAY) &&
-                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(data), "headers", sizeof("headers"), (void **) &headers)) &&
+                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(data), "headers", sizeof("headers"), (void *) &headers)) &&
                                (Z_TYPE_PP(headers) == IS_ARRAY)) {
                        int i = 0;
                        ulong idx = 0;
@@ -1775,7 +1775,7 @@ PHP_METHOD(HttpRequest, getResponseBody)
                zval *data = GET_PROP(responseData);
                
                if (    (Z_TYPE_P(data) == IS_ARRAY) && 
-                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(data), "body", sizeof("body"), (void **) &body))) {
+                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(data), "body", sizeof("body"), (void *) &body))) {
                        RETURN_ZVAL(*body, 1, 0);
                } else {
                        RETURN_FALSE;
@@ -1853,7 +1853,7 @@ PHP_METHOD(HttpRequest, getResponseInfo)
                }
 
                if (info_len && info_name) {
-                       if (SUCCESS == zend_hash_find(Z_ARRVAL_P(info), pretty_key(info_name, info_len, 0, 0), info_len + 1, (void **) &infop)) {
+                       if (SUCCESS == zend_hash_find(Z_ARRVAL_P(info), pretty_key(info_name, info_len, 0, 0), info_len + 1, (void *) &infop)) {
                                RETURN_ZVAL(*infop, 1, 0);
                        } else {
                                http_error_ex(HE_NOTICE, HTTP_E_INVALID_PARAM, "Could not find response info named %s", info_name);
index 31261cf1d2f4c3281e0e3c0830fc2a34bc3902ce..cf8421848b4a55ae6f0eabde2361d8d27938f131 100644 (file)
@@ -289,11 +289,11 @@ static void move_backtrace_args(zval *from, zval *to TSRMLS_DC)
        zval **args, **trace_0, *old_trace_0, *trace = NULL;
        
        if ((trace = zend_read_property(zend_exception_get_default(), from, "trace", lenof("trace"), 0 TSRMLS_CC))) {
-               if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void **) &trace_0)) {
+               if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void *) &trace_0)) {
                        old_trace_0 = *trace_0;
-                       if (SUCCESS == zend_hash_find(Z_ARRVAL_PP(trace_0), "args", sizeof("args"), (void **) &args)) {
+                       if (SUCCESS == zend_hash_find(Z_ARRVAL_PP(trace_0), "args", sizeof("args"), (void *) &args)) {
                                if ((trace = zend_read_property(zend_exception_get_default(), to, "trace", lenof("trace"), 0 TSRMLS_CC))) {
-                                       if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void **) &trace_0)) {
+                                       if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void *) &trace_0)) {
                                                ZVAL_ADDREF(*args);
                                                add_assoc_zval(*trace_0, "args", *args);
                                                zend_hash_del(Z_ARRVAL_P(old_trace_0), "args", sizeof("args"));
index 918647dc721db4c14269f865728491afcefc6892..9fb4771d8b2726850f2a7c3274b4d40e9f4e51a1 100644 (file)
@@ -331,7 +331,7 @@ PHP_METHOD(HttpResponse, getHeader)
                
                zend_hash_init(&headers_ht, sizeof(zval *), NULL, ZVAL_PTR_DTOR, 0);
                if (    (SUCCESS == http_parse_headers_ex(PHPSTR_VAL(&headers), &headers_ht, 1)) &&
-                               (SUCCESS == zend_hash_find(&headers_ht, name, name_len + 1, (void **) &header))) {
+                               (SUCCESS == zend_hash_find(&headers_ht, name, name_len + 1, (void *) &header))) {
                        RETVAL_ZVAL(*header, 1, 0);
                } else {
                        RETVAL_NULL();
index 82bdff01402d8108d8eaca91a95e7fe166c02f22..93271dbd68ac407689eb09bd9b3f50881ddae0a9 100644 (file)
@@ -341,9 +341,9 @@ PHP_HTTP_API STATUS _http_send_ex(const void *data_ptr, size_t data_size, http_s
                                /* single range */
                                zval **range, **begin, **end;
                                
-                               if (    SUCCESS != zend_hash_index_find(&ranges, 0, (void **) &range) ||
-                                               SUCCESS != zend_hash_index_find(Z_ARRVAL_PP(range), 0, (void **) &begin) ||
-                                               SUCCESS != zend_hash_index_find(Z_ARRVAL_PP(range), 1, (void **) &end)) {
+                               if (    SUCCESS != zend_hash_index_find(&ranges, 0, (void *) &range) ||
+                                               SUCCESS != zend_hash_index_find(Z_ARRVAL_PP(range), 0, (void *) &begin) ||
+                                               SUCCESS != zend_hash_index_find(Z_ARRVAL_PP(range), 1, (void *) &end)) {
                                        /* this should never happen */
                                        zend_hash_destroy(&ranges);
                                        http_send_status(500);
@@ -379,8 +379,8 @@ PHP_HTTP_API STATUS _http_send_ex(const void *data_ptr, size_t data_size, http_s
                                }
                                
                                FOREACH_HASH_VAL(pos, &ranges, range) {
-                                       if (    SUCCESS == zend_hash_index_find(Z_ARRVAL_PP(range), 0, (void **) &begin) &&
-                                                       SUCCESS == zend_hash_index_find(Z_ARRVAL_PP(range), 1, (void **) &end)) {
+                                       if (    SUCCESS == zend_hash_index_find(Z_ARRVAL_PP(range), 0, (void *) &begin) &&
+                                                       SUCCESS == zend_hash_index_find(Z_ARRVAL_PP(range), 1, (void *) &end)) {
                                                char preface_str[512];
                                                size_t preface_len;
 
index 553796aa7fd15f363d725691486c2f3f2b18c83d..32ce1e365123d6af1f8a15943a52130c7f654a2c 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef PHP_EXT_HTTP_H
 #define PHP_EXT_HTTP_H
 
-#define PHP_EXT_HTTP_VERSION "1.0.0RC2"
+#define PHP_EXT_HTTP_VERSION "1.0.0RC3-dev"
 
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
index 763cd471c7f1205765755ec53b699b10bc6f5d51..e3ab8397a53ca8c6d425e6157c75112cd0ce50d5 100644 (file)
@@ -56,7 +56,7 @@ PHP_HTTP_API void _http_message_set_info(http_message *message, http_info *info)
 static inline zval *_http_message_header_ex(http_message *msg, char *key_str, size_t key_len)
 {
        zval **header;
-       if (SUCCESS == zend_hash_find(&msg->hdrs, key_str, key_len, (void **) &header)) {
+       if (SUCCESS == zend_hash_find(&msg->hdrs, key_str, key_len, (void *) &header)) {
                return *header;
        }
        return NULL;
index 51b61254533acd62b49e0b0a64d29e149b41a186..a3a3056f168e49ca52608f4162d3305fce859ac8 100644 (file)
@@ -149,7 +149,7 @@ typedef int STATUS;
 #define FOREACH_VAL(pos, array, val) FOREACH_HASH_VAL(pos, Z_ARRVAL_P(array), val)
 #define FOREACH_HASH_VAL(pos, hash, val) \
        for (   zend_hash_internal_pointer_reset_ex(hash, &pos); \
-                       zend_hash_get_current_data_ex(hash, (void **) &val, &pos) == SUCCESS; \
+                       zend_hash_get_current_data_ex(hash, (void *) &val, &pos) == SUCCESS; \
                        zend_hash_move_forward_ex(hash, &pos))
 
 #define FOREACH_KEY(pos, array, strkey, numkey) FOREACH_HASH_KEY(pos, Z_ARRVAL_P(array), strkey, numkey)
@@ -168,14 +168,14 @@ typedef int STATUS;
 #define FOREACH_HASH_KEYVAL(pos, hash, strkey, numkey, val) \
        for (   zend_hash_internal_pointer_reset_ex(hash, &pos); \
                        zend_hash_get_current_key_ex(hash, &strkey, NULL, &numkey, 0, &pos) != HASH_KEY_NON_EXISTANT && \
-                       zend_hash_get_current_data_ex(hash, (void **) &val, &pos) == SUCCESS; \
+                       zend_hash_get_current_data_ex(hash, (void *) &val, &pos) == SUCCESS; \
                        zend_hash_move_forward_ex(hash, &pos))
 
 #define FOREACH_KEYLENVAL(pos, array, strkey, keylen, numkey, val) FOREACH_HASH_KEYLENVAL(pos, Z_ARRVAL_P(array), strkey, keylen, numkey, val)
 #define FOREACH_HASH_KEYLENVAL(pos, hash, strkey, keylen, numkey, val) \
        for (   zend_hash_internal_pointer_reset_ex(hash, &pos); \
                        zend_hash_get_current_key_ex(hash, &strkey, &keylen, &numkey, 0, &pos) != HASH_KEY_NON_EXISTANT && \
-                       zend_hash_get_current_data_ex(hash, (void **) &val, &pos) == SUCCESS; \
+                       zend_hash_get_current_data_ex(hash, (void *) &val, &pos) == SUCCESS; \
                        zend_hash_move_forward_ex(hash, &pos))
 
 #define array_copy(src, dst)   zend_hash_copy(Z_ARRVAL_P(dst), Z_ARRVAL_P(src), (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *))
@@ -190,13 +190,13 @@ typedef int STATUS;
                 \
                for (   zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(src), &pos); \
                                zend_hash_get_current_key_ex(Z_ARRVAL_P(src), &key, &klen, &idx, 0, &pos) != HASH_KEY_NON_EXISTANT && \
-                               zend_hash_get_current_data_ex(Z_ARRVAL_P(src), (void **) &data, &pos) == SUCCESS; \
+                               zend_hash_get_current_data_ex(Z_ARRVAL_P(src), (void *) &data, &pos) == SUCCESS; \
                                zend_hash_move_forward_ex(Z_ARRVAL_P(src), &pos)) \
                { \
                        if (key) { \
                                zval **tmp; \
                                 \
-                               if (SUCCESS == zend_hash_find(Z_ARRVAL_P(dst), key, klen, (void **) &tmp)) { \
+                               if (SUCCESS == zend_hash_find(Z_ARRVAL_P(dst), key, klen, (void *) &tmp)) { \
                                        if (Z_TYPE_PP(tmp) != IS_ARRAY) { \
                                                convert_to_array_ex(tmp); \
                                        } \
index dc0089909674861d236a78e59d42e45c1f74aa1d..a4c5df0b3690997c9f7a00dfcab08c25b56176c4 100644 (file)
@@ -49,35 +49,35 @@ static inline php_url *_array2url(HashTable *ht TSRMLS_DC)
        zval **e;
        php_url *url = ecalloc(1, sizeof(php_url));
        
-       if ((SUCCESS == zend_hash_find(ht, "scheme", sizeof("scheme"), (void **) &e))
+       if ((SUCCESS == zend_hash_find(ht, "scheme", sizeof("scheme"), (void *) &e))
                        && (Z_TYPE_PP(e) == IS_STRING) && Z_STRLEN_PP(e)) {
                url->scheme = estrndup(Z_STRVAL_PP(e), Z_STRLEN_PP(e));
        }
-       if ((SUCCESS == zend_hash_find(ht, "user", sizeof("user"), (void **) &e))
+       if ((SUCCESS == zend_hash_find(ht, "user", sizeof("user"), (void *) &e))
                        && (Z_TYPE_PP(e) == IS_STRING) && Z_STRLEN_PP(e)) {
                url->user = estrndup(Z_STRVAL_PP(e), Z_STRLEN_PP(e));
        }
-       if ((SUCCESS == zend_hash_find(ht, "pass", sizeof("pass"), (void **) &e))
+       if ((SUCCESS == zend_hash_find(ht, "pass", sizeof("pass"), (void *) &e))
                        && (Z_TYPE_PP(e) == IS_STRING) && Z_STRLEN_PP(e)) {
                url->pass = estrndup(Z_STRVAL_PP(e), Z_STRLEN_PP(e));
        }
-       if ((SUCCESS == zend_hash_find(ht, "host", sizeof("host"), (void **) &e))
+       if ((SUCCESS == zend_hash_find(ht, "host", sizeof("host"), (void *) &e))
                        && (Z_TYPE_PP(e) == IS_STRING) && Z_STRLEN_PP(e)) {
                url->host = estrndup(Z_STRVAL_PP(e), Z_STRLEN_PP(e));
        }
-       if ((SUCCESS == zend_hash_find(ht, "path", sizeof("path"), (void **) &e))
+       if ((SUCCESS == zend_hash_find(ht, "path", sizeof("path"), (void *) &e))
                        && (Z_TYPE_PP(e) == IS_STRING) && Z_STRLEN_PP(e)) {
                url->path = estrndup(Z_STRVAL_PP(e), Z_STRLEN_PP(e));
        }
-       if ((SUCCESS == zend_hash_find(ht, "query", sizeof("query"), (void **) &e))
+       if ((SUCCESS == zend_hash_find(ht, "query", sizeof("query"), (void *) &e))
                        && (Z_TYPE_PP(e) == IS_STRING) && Z_STRLEN_PP(e)) {
                url->query = estrndup(Z_STRVAL_PP(e), Z_STRLEN_PP(e));
        }
-       if ((SUCCESS == zend_hash_find(ht, "fragment", sizeof("fragment"), (void **) &e))
+       if ((SUCCESS == zend_hash_find(ht, "fragment", sizeof("fragment"), (void *) &e))
                        && (Z_TYPE_PP(e) == IS_STRING) && Z_STRLEN_PP(e)) {
                url->fragment = estrndup(Z_STRVAL_PP(e), Z_STRLEN_PP(e));
        }
-       if (SUCCESS == zend_hash_find(ht, "port", sizeof("port"), (void **) &e)) {
+       if (SUCCESS == zend_hash_find(ht, "port", sizeof("port"), (void *) &e)) {
                if (Z_TYPE_PP(e) == IS_LONG) {
                        url->port = (unsigned short) Z_LVAL_PP(e);
                } else {