summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/dav/dav.c2
-rw-r--r--ext/hyperwave/hw.c2
-rw-r--r--ext/java/java.c2
-rw-r--r--ext/odbc/php_odbc.c2
-rw-r--r--ext/pcre/php_pcre.c4
-rw-r--r--ext/rpc/com/COM.c4
-rw-r--r--ext/rpc/java/java.c2
-rw-r--r--ext/session/session.c2
-rw-r--r--ext/standard/array.c2
-rw-r--r--ext/standard/iptc.c2
-rw-r--r--ext/standard/post.c6
-rw-r--r--ext/standard/var.c16
-rw-r--r--ext/sybase_ct/php_sybase_ct.c4
-rw-r--r--ext/wddx/wddx.c8
14 files changed, 31 insertions, 27 deletions
diff --git a/ext/dav/dav.c b/ext/dav/dav.c
index 0b520f206a..84352dfcf8 100644
--- a/ext/dav/dav.c
+++ b/ext/dav/dav.c
@@ -192,7 +192,7 @@ dav_call_handler(char *funcName, int argc, pval **argv)
HashTable *function_table;
func = php3i_string_pval(funcName);
- retval = ALLOC_ZVAL();
+ ALLOC_ZVAL(retval);
function_table = php3i_get_function_table();
if (call_user_function(function_table, NULL, func, retval, argc, argv) == FAILURE) {
php3tls_pval_destructor(retval);
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c
index 6de2d88784..2e089ca560 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 = ALLOC_ZVAL();
+ ALLOC_ZVAL(user_arr);
if (array_init(user_arr) == FAILURE) {
efree(object);
RETURN_FALSE;
diff --git a/ext/java/java.c b/ext/java/java.c
index db8188f2c5..5e6e09a277 100644
--- a/ext/java/java.c
+++ b/ext/java/java.c
@@ -500,7 +500,7 @@ JNIEXPORT void JNICALL Java_net_php_reflect_setResultFromObject
zend_hash_init(presult->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
};
- handle = ALLOC_ZVAL();
+ ALLOC_ZVAL(handle);
handle->type = IS_LONG;
handle->value.lval =
zend_list_insert((*jenv)->NewGlobalRef(jenv,value), le_jobject);
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index adde6bce15..cbf8987f6c 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -1096,7 +1096,7 @@ PHP_FUNCTION(odbc_fetch_into)
result->fetched++;
for(i = 0; i < result->numcols; i++) {
- tmp = ALLOC_ZVAL();
+ ALLOC_ZVAL(tmp);
tmp->refcount = 1;
tmp->type = IS_STRING;
tmp->value.str.len = 0;
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index aeaf0bf0df..c7a7b3d1a9 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] = ALLOC_ZVAL();
+ ALLOC_ZVAL(match_sets[i]);
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 = ALLOC_ZVAL();
+ ALLOC_ZVAL(result_set);
array_init(result_set);
INIT_PZVAL(result_set);
diff --git a/ext/rpc/com/COM.c b/ext/rpc/com/COM.c
index f8659f0f78..a876e7afd3 100644
--- a/ext/rpc/com/COM.c
+++ b/ext/rpc/com/COM.c
@@ -416,7 +416,7 @@ static void php_variant_to_pval(VARIANTARG *var_arg, pval *pval_arg, int persist
pval_arg->refcount=1;
zend_hash_init(pval_arg->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
- handle = ALLOC_ZVAL();
+ ALLOC_ZVAL(handle);
handle->type = IS_LONG;
handle->value.lval = zend_list_insert(var_arg->pdispVal, le_idispatch);
pval_copy_constructor(handle);
@@ -915,7 +915,7 @@ void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_r
var_reset(object);
return;
}
- object_handle = ALLOC_ZVAL();
+ ALLOC_ZVAL(object_handle);
*object_handle = *return_value;
pval_copy_constructor(object_handle);
INIT_PZVAL(object_handle);
diff --git a/ext/rpc/java/java.c b/ext/rpc/java/java.c
index db8188f2c5..5e6e09a277 100644
--- a/ext/rpc/java/java.c
+++ b/ext/rpc/java/java.c
@@ -500,7 +500,7 @@ JNIEXPORT void JNICALL Java_net_php_reflect_setResultFromObject
zend_hash_init(presult->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
};
- handle = ALLOC_ZVAL();
+ ALLOC_ZVAL(handle);
handle->type = IS_LONG;
handle->value.lval =
zend_list_insert((*jenv)->NewGlobalRef(jenv,value), le_jobject);
diff --git a/ext/session/session.c b/ext/session/session.c
index ca7df05099..9e225ba8ec 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 = ALLOC_ZVAL();
+ ALLOC_ZVAL(state_val_copy);
*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 c60f9a6f36..22bf7e97c8 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 = ALLOC_ZVAL();
+ ALLOC_ZVAL(data);
*data = *value;
zval_copy_ctor(data);
INIT_PZVAL(data);
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index 64e886faa5..b99ea852f1 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -356,7 +356,7 @@ PHP_FUNCTION(iptcparse)
}
if (zend_hash_find(return_value->value.ht,key,strlen(key) + 1,(void **) &element) == FAILURE) {
- values = ALLOC_ZVAL();
+ ALLOC_ZVAL(values);
INIT_PZVAL(values);
if (array_init(values) == FAILURE) {
php_error(E_ERROR, "Unable to initialize array");
diff --git a/ext/standard/post.c b/ext/standard/post.c
index b41007239a..0056db2b62 100644
--- a/ext/standard/post.c
+++ b/ext/standard/post.c
@@ -112,7 +112,7 @@ void php_parse_gpc_data(char *val, char *var, pval *track_vars_array ELS_DC PLS_
}
/* Create the element */
- array_element = ALLOC_ZVAL();
+ ALLOC_ZVAL(array_element);
INIT_PZVAL(array_element);
array_element->value.str.val = val;
array_element->value.str.len = val_len;
@@ -315,7 +315,7 @@ void php_treat_data(int arg, char *str ELS_DC PLS_DC SLS_DC)
case PARSE_GET:
case PARSE_COOKIE:
if (PG(track_vars)) {
- array_ptr = ALLOC_ZVAL();
+ ALLOC_ZVAL(array_ptr);
array_init(array_ptr);
INIT_PZVAL(array_ptr);
switch (arg) {
@@ -369,7 +369,7 @@ void php_treat_data(int arg, char *str ELS_DC PLS_DC SLS_DC)
if((NULL != SG(request_info).content_type) && (0 == strcmp(SG(request_info).content_type, "application/vnd.fdf"))) {
pval *tmp;
- tmp = ALLOC_ZVAL();
+ ALLOC_ZVAL(tmp);
tmp->value.str.len = SG(request_info).post_data_length;
tmp->value.str.val = estrndup(SG(request_info).post_data, SG(request_info).post_data_length);
tmp->type = IS_STRING;
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 263dfad42c..649fa87e30 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -96,8 +96,9 @@ void php_var_dump(pval **struc, int level)
}
switch (i) {
case HASH_KEY_IS_LONG:{
- pval *d = ALLOC_ZVAL();
+ pval *d;
+ ALLOC_ZVAL(d);
d->type = IS_LONG;
d->value.lval = index;
php_var_dump(&d, level + 2);
@@ -106,8 +107,9 @@ void php_var_dump(pval **struc, int level)
break;
case HASH_KEY_IS_STRING:{
- pval *d = ALLOC_ZVAL();
+ pval *d;
+ ALLOC_ZVAL(d);
d->type = IS_STRING;
d->value.str.val = key;
d->value.str.len = strlen(key);
@@ -253,14 +255,14 @@ void php_var_serialize(pval *buf, pval **struc)
switch (i) {
case HASH_KEY_IS_LONG:
- d = ALLOC_ZVAL();
+ ALLOC_ZVAL(d);
d->type = IS_LONG;
d->value.lval = index;
php_var_serialize(buf, &d);
efree(d);
break;
case HASH_KEY_IS_STRING:
- d = ALLOC_ZVAL();
+ ALLOC_ZVAL(d);
d->type = IS_STRING;
d->value.str.val = key;
d->value.str.len = strlen(key);
@@ -431,9 +433,11 @@ int php_var_unserialize(pval **rval, const char **p, const char *max)
return 0;
}
for ((*p) += 2; **p && **p != '}' && i > 0; i--) {
- pval *key = ALLOC_ZVAL();
- pval *data = ALLOC_ZVAL();
+ pval *key;
+ pval *data;
+ ALLOC_ZVAL(key);
+ ALLOC_ZVAL(data);
if (!php_var_unserialize(&key, p, max)) {
zval_dtor(key);
efree(key);
diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c
index d241e9a21c..b5106e9530 100644
--- a/ext/sybase_ct/php_sybase_ct.c
+++ b/ext/sybase_ct/php_sybase_ct.c
@@ -1224,7 +1224,7 @@ PHP_FUNCTION(sybase_fetch_row)
array_init(return_value);
for (i=0; i<result->num_fields; i++) {
- field_content = ALLOC_ZVAL();
+ ALLOC_ZVAL(field_content);
*field_content = result->data[result->cur_row][i];
INIT_PZVAL(field_content);
pval_copy_constructor(field_content);
@@ -1257,7 +1257,7 @@ static void php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)
}
for (i=0; i<result->num_fields; i++) {
- tmp = ALLOC_ZVAL();
+ ALLOC_ZVAL(tmp);
*tmp = result->data[result->cur_row][i];
INIT_PZVAL(tmp);
if (PG(magic_quotes_runtime) && tmp->type == IS_STRING) {
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index d4247efc9a..ed8b12fbb5 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 = ALLOC_ZVAL();
+ ALLOC_ZVAL(ent.data);
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 = ALLOC_ZVAL();
+ ALLOC_ZVAL(ent.data);
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 = ALLOC_ZVAL();
+ ALLOC_ZVAL(ent.data);
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 = ALLOC_ZVAL();
+ ALLOC_ZVAL(ent.data);
array_init(ent.data);
INIT_PZVAL(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));