#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))) {
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);
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);
{
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:
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(); \
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) { \
}
/* 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);
#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;
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);
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);
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);
}
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);
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);
}
/* 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 */
{
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) {
#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");
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);
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)) {
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);
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);
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);
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;
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;
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 */
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);
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));
}
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);
}
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;
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;
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;
}
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);
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"));
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();
/* 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);
}
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;
#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"
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;
#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)
#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 *))
\
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); \
} \
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 {