summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/hyperwave/hw.c2
-rw-r--r--ext/pcre/php_pcre.c4
-rw-r--r--ext/session/session.c2
-rw-r--r--ext/standard/array.c2
-rw-r--r--ext/wddx/wddx.c8
-rw-r--r--sapi/isapi/php4isapi.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c
index 72223fbd80..6de2d88784 100644
--- a/ext/hyperwave/hw.c
+++ b/ext/hyperwave/hw.c
@@ -1175,7 +1175,7 @@ php_printf("%s\n", ptr);
while(attrname != NULL) {
char *name;
- user_arr = (zval *) emalloc(sizeof(zval));
+ user_arr = ALLOC_ZVAL();
if (array_init(user_arr) == FAILURE) {
efree(object);
RETURN_FALSE;
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 865b94924d..aeaf0bf0df 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -393,7 +393,7 @@ static void _pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
if (global && subpats_order_val == PREG_PATTERN_ORDER) {
match_sets = (zval **)emalloc(num_subpats * sizeof(zval *));
for (i=0; i<num_subpats; i++) {
- match_sets[i] = (zval *)emalloc(sizeof(zval));
+ match_sets[i] = ALLOC_ZVAL();
array_init(match_sets[i]);
INIT_PZVAL(match_sets[i]);
}
@@ -441,7 +441,7 @@ static void _pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
}
else {
/* Allocate the result set array */
- result_set = emalloc(sizeof(zval));
+ result_set = ALLOC_ZVAL();
array_init(result_set);
INIT_PZVAL(result_set);
diff --git a/ext/session/session.c b/ext/session/session.c
index 26c7097094..ca7df05099 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -176,7 +176,7 @@ static void php_set_session_var(char *name, size_t namelen,
PLS_FETCH();
ELS_FETCH();
- state_val_copy = (zval *)emalloc(sizeof(zval));
+ state_val_copy = ALLOC_ZVAL();
*state_val_copy = *state_val;
zval_copy_ctor(state_val_copy);
state_val_copy->refcount = 0;
diff --git a/ext/standard/array.c b/ext/standard/array.c
index a7c7a908e8..c60f9a6f36 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1059,7 +1059,7 @@ static void _compact_var(HashTable *eg_active_symbol_table, zval *return_value,
if (zend_hash_find(eg_active_symbol_table, entry->value.str.val,
entry->value.str.len+1, (void **)&value_ptr) != FAILURE) {
value = *value_ptr;
- data = (zval *)emalloc(sizeof(zval));
+ data = ALLOC_ZVAL();
*data = *value;
zval_copy_ctor(data);
INIT_PZVAL(data);
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 4c34d4c00d..d4247efc9a 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -468,7 +468,7 @@ static void _php_wddx_push_element(void *user_data, const char *name, const char
} else
ent.varname = NULL;
- ent.data = (zval *)emalloc(sizeof(zval));
+ ent.data = ALLOC_ZVAL();
ent.data->value.str.val = NULL;
ent.data->value.str.len = 0;
INIT_PZVAL(ent.data);
@@ -492,7 +492,7 @@ static void _php_wddx_push_element(void *user_data, const char *name, const char
} else
ent.varname = NULL;
- ent.data = (zval *)emalloc(sizeof(zval));
+ ent.data = ALLOC_ZVAL();
INIT_PZVAL(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
} else if (!strcmp(name, EL_ARRAY)) {
@@ -504,7 +504,7 @@ static void _php_wddx_push_element(void *user_data, const char *name, const char
} else
ent.varname = NULL;
- ent.data = (zval *)emalloc(sizeof(zval));
+ ent.data = ALLOC_ZVAL();
array_init(ent.data);
INIT_PZVAL(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
@@ -517,7 +517,7 @@ static void _php_wddx_push_element(void *user_data, const char *name, const char
} else
ent.varname = NULL;
- ent.data = (zval *)emalloc(sizeof(zval));
+ ent.data = ALLOC_ZVAL();
array_init(ent.data);
INIT_PZVAL(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c
index 83416f3ffb..489bd627e2 100644
--- a/sapi/isapi/php4isapi.c
+++ b/sapi/isapi/php4isapi.c
@@ -407,7 +407,7 @@ static void hash_isapi_variables(ELS_D SLS_DC)
if (colon) {
char *value = colon+1;
- zval *entry = (zval *) emalloc(sizeof(zval));
+ zval *entry = ALLOC_ZVAL();
while (*value==' ') {
value++;