summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/main.c20
-rw-r--r--main/php3_compat.h1
-rw-r--r--main/php_variables.c4
3 files changed, 12 insertions, 13 deletions
diff --git a/main/main.c b/main/main.c
index 45f23da150..435eb43762 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1004,22 +1004,22 @@ static int php_hash_environment(ELS_D SLS_DC PLS_DC)
}
if (PG(http_globals).post) {
- zend_hash_update_ptr(&EG(symbol_table), "HTTP_POST_VARS", sizeof("HTTP_POST_VARS"), PG(http_globals).post, sizeof(zval *), NULL);
+ zend_hash_update(&EG(symbol_table), "HTTP_POST_VARS", sizeof("HTTP_POST_VARS"), &PG(http_globals).post, sizeof(zval *), NULL);
}
if (PG(http_globals).get) {
- zend_hash_update_ptr(&EG(symbol_table), "HTTP_GET_VARS", sizeof("HTTP_GET_VARS"), PG(http_globals).get, sizeof(zval *), NULL);
+ zend_hash_update(&EG(symbol_table), "HTTP_GET_VARS", sizeof("HTTP_GET_VARS"), &PG(http_globals).get, sizeof(zval *), NULL);
}
if (PG(http_globals).cookie) {
- zend_hash_update_ptr(&EG(symbol_table), "HTTP_COOKIE_VARS", sizeof("HTTP_COOKIE_VARS"), PG(http_globals).cookie, sizeof(zval *), NULL);
+ zend_hash_update(&EG(symbol_table), "HTTP_COOKIE_VARS", sizeof("HTTP_COOKIE_VARS"), &PG(http_globals).cookie, sizeof(zval *), NULL);
}
if (PG(http_globals).server) {
- zend_hash_update_ptr(&EG(symbol_table), "HTTP_SERVER_VARS", sizeof("HTTP_SERVER_VARS"), PG(http_globals).server, sizeof(zval *), NULL);
+ zend_hash_update(&EG(symbol_table), "HTTP_SERVER_VARS", sizeof("HTTP_SERVER_VARS"), &PG(http_globals).server, sizeof(zval *), NULL);
}
if (PG(http_globals).environment) {
- zend_hash_update_ptr(&EG(symbol_table), "HTTP_ENV_VARS", sizeof("HTTP_ENV_VARS"), PG(http_globals).environment, sizeof(zval *), NULL);
+ zend_hash_update(&EG(symbol_table), "HTTP_ENV_VARS", sizeof("HTTP_ENV_VARS"), &PG(http_globals).environment, sizeof(zval *), NULL);
}
if (PG(http_globals).post_files) {
- zend_hash_update_ptr(&EG(symbol_table), "HTTP_POST_FILES", sizeof("HTTP_POST_FILES"), PG(http_globals).post_files, sizeof(zval *),NULL);
+ zend_hash_update(&EG(symbol_table), "HTTP_POST_FILES", sizeof("HTTP_POST_FILES"), &PG(http_globals).post_files, sizeof(zval *),NULL);
}
return SUCCESS;
@@ -1070,8 +1070,8 @@ static void php_build_argv(char *s, zval *track_vars_array ELS_DC PLS_DC)
INIT_PZVAL(argc);
if (PG(register_globals)) {
- zend_hash_update_ptr(&EG(symbol_table), "argv", sizeof("argv"), arr, sizeof(pval *), NULL);
- zend_hash_add_ptr(&EG(symbol_table), "argc", sizeof("argc"), argc, sizeof(pval *), NULL);
+ zend_hash_update(&EG(symbol_table), "argv", sizeof("argv"), &arr, sizeof(zval *), NULL);
+ zend_hash_add(&EG(symbol_table), "argc", sizeof("argc"), &argc, sizeof(zval *), NULL);
}
if (PG(track_vars)) {
@@ -1079,8 +1079,8 @@ static void php_build_argv(char *s, zval *track_vars_array ELS_DC PLS_DC)
arr->refcount++;
argc->refcount++;
}
- zend_hash_update_ptr(track_vars_array->value.ht, "argv", sizeof("argv"), arr, sizeof(pval *), NULL);
- zend_hash_update_ptr(track_vars_array->value.ht, "argc", sizeof("argc"), argc, sizeof(pval *), NULL);
+ zend_hash_update(track_vars_array->value.ht, "argv", sizeof("argv"), &arr, sizeof(pval *), NULL);
+ zend_hash_update(track_vars_array->value.ht, "argc", sizeof("argc"), &argc, sizeof(pval *), NULL);
}
}
diff --git a/main/php3_compat.h b/main/php3_compat.h
index b6e1f960c6..f2c360e704 100644
--- a/main/php3_compat.h
+++ b/main/php3_compat.h
@@ -9,7 +9,6 @@
#define _php3_hash_add_or_update zend_hash_add_or_update
#define _php3_hash_add zend_hash_add
#define _php3_hash_update zend_hash_update
-#define _php3_hash_update_ptr zend_hash_update_ptr
#define _php3_hash_quick_add_or_update zend_hash_quick_add_or_update
#define _php3_hash_quick_add zend_hash_quick_add
diff --git a/main/php_variables.c b/main/php_variables.c
index 53aead4f6d..8f612b3456 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -166,7 +166,7 @@ PHPAPI void php_register_variable_ex(char *var, zval *val, pval *track_vars_arra
if (!index) {
zend_hash_next_index_insert(symtable1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
} else {
- zend_hash_update_ptr(symtable1, index, index_len+1, gpc_element, sizeof(zval *), (void **) &gpc_element_p);
+ zend_hash_update(symtable1, index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
}
if (!top_gpc_p) {
top_gpc_p = gpc_element_p;
@@ -177,7 +177,7 @@ PHPAPI void php_register_variable_ex(char *var, zval *val, pval *track_vars_arra
if (top_gpc_p) {
if (symtable2) {
- zend_hash_update_ptr(symtable2, var, var_len+1, *top_gpc_p, sizeof(zval *), NULL);
+ zend_hash_update(symtable2, var, var_len+1, top_gpc_p, sizeof(zval *), NULL);
(*top_gpc_p)->refcount++;
}
}