them.
#define INIT_ZVAL(z) z = zval_used_for_init;
+#define ALLOC_ZVAL() (zval *) emalloc(sizeof(zval))
+
+#define FREE_ZVAL(z) efree(z)
+
#define ALLOC_INIT_ZVAL(zp) \
- (zp) = (zval *) emalloc(sizeof(zval)); \
+ (zp) = ALLOC_ZVAL(); \
INIT_ZVAL(*zp);
#define MAKE_STD_ZVAL(zv) \
- zv = (zval *) emalloc(sizeof(zval)); \
+ zv = ALLOC_ZVAL(); \
INIT_PZVAL(zv);
#define SEPARATE_ZVAL(ppzv) \
\
if (orig_ptr->refcount>1) { \
orig_ptr->refcount--; \
- *(ppzv) = (zval *) emalloc(sizeof(zval)); \
+ *(ppzv) = ALLOC_ZVAL(); \
**(ppzv) = *orig_ptr; \
zval_copy_ctor(*(ppzv)); \
(*(ppzv))->refcount=1; \
zval_copy_ctor(&(zv)); \
(pzv)->refcount--; \
} else { \
- efree(pzv); \
+ FREE_ZVAL(pzv); \
} \
INIT_PZVAL(&(zv));
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
- new_tmp = (zval *) emalloc(sizeof(zval));
+ new_tmp = ALLOC_ZVAL();
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
INIT_PZVAL(new_tmp);
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
- new_tmp = (zval *) emalloc(sizeof(zval));
+ new_tmp = ALLOC_ZVAL();
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
INIT_PZVAL(new_tmp);
ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_LONG;
tmp->value.lval = n;
ZEND_API inline int add_assoc_bool(zval *arg, char *key, int b)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_BOOL;
tmp->value.lval = b;
ZEND_API inline int add_assoc_resource(zval *arg, char *key, int r)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
ZEND_API inline int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = length;
ZEND_API inline int add_index_long(zval *arg, uint index, long n)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_LONG;
tmp->value.lval = n;
ZEND_API inline int add_index_bool(zval *arg, uint index, int b)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_BOOL;
tmp->value.lval = b;
ZEND_API inline int add_index_resource(zval *arg, uint index, int r)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
ZEND_API inline int add_index_double(zval *arg, uint index, double d)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint length, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = length;
ZEND_API inline int add_next_index_long(zval *arg, long n)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_LONG;
tmp->value.lval = n;
ZEND_API inline int add_next_index_bool(zval *arg, int b)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_BOOL;
tmp->value.lval = b;
ZEND_API inline int add_next_index_resource(zval *arg, int r)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
ZEND_API inline int add_next_index_double(zval *arg, double d)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
ZEND_API inline int add_next_index_string(zval *arg, char *str, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = length;
ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = length;
ZEND_API inline int add_get_index_long(zval *arg, uint index, long l, void **dest)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_LONG;
tmp->value.lval = l;
ZEND_API inline int add_get_index_double(zval *arg, uint index, double d, void **dest)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_DOUBLE;
tmp->value.dval= d;
ZEND_API inline int add_get_index_string(zval *arg, uint index, char *str, void **dest, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
ZEND_API inline int add_get_index_stringl(zval *arg, uint index, char *str, uint length, void **dest, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = length;
ZEND_API inline int add_property_long(zval *arg, char *key, long n)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_LONG;
tmp->value.lval = n;
ZEND_API inline int add_property_resource(zval *arg, char *key, long n)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_RESOURCE;
tmp->value.lval = n;
ZEND_API inline int add_property_double(zval *arg, char *key, double d)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
{
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
tmp->type = IS_STRING;
tmp->value.str.len = length;
#define SET_VAR_STRING(n,v) { \
{ \
- zval *var = (zval *) emalloc(sizeof(zval)); \
+ zval *var = ALLOC_ZVAL(); \
char *str=(v); /* prevent 'v' from being evaluated more than once */ \
\
var->value.str.val = (str); \
#define SET_VAR_STRINGL(n,v,l) { \
{ \
- zval *var = (zval *) emalloc(sizeof(zval)); \
+ zval *var = ALLOC_ZVAL(); \
\
var->value.str.val = (v); \
var->value.str.len = (l); \
#define SET_VAR_LONG(n,v) { \
{ \
- zval *var = (zval *) emalloc(sizeof(zval)); \
+ zval *var = ALLOC_ZVAL(); \
\
var->value.lval = (v); \
var->type = IS_LONG; \
#define SET_VAR_DOUBLE(n,v) { \
{ \
- zval *var = (zval *) emalloc(sizeof(zval)); \
+ zval *var = ALLOC_ZVAL(); \
\
var->value.dval = (v); \
var->type = IS_DOUBLE; \
} \
zval_dtor(*orig_var); \
**orig_var = *(var); \
- efree(var); \
+ FREE_ZVAL(var); \
} else { \
(var)->is_ref = _is_ref; \
if (_refcount) { \
for (i=0; i<arg_count; i++) {
zval *element;
- element = (zval *) emalloc(sizeof(zval));
+ element = ALLOC_ZVAL();
*element = **((zval **) (p-(arg_count-i)));
zval_copy_ctor(element);
INIT_PZVAL(element);
/* add value elements */
if (entry->is_ref) {
- tmp = (zval *)emalloc(sizeof(zval));
+ tmp = ALLOC_ZVAL();
*tmp = *entry;
zval_copy_ctor(tmp);
tmp->is_ref=0;
void do_declare_property(znode *var_name, znode *value CLS_DC)
{
if (value) {
- zval *property = (zval *) emalloc(sizeof(zval));
+ zval *property = ALLOC_ZVAL();
*property = value->u.constant;
zend_hash_update(&CG(active_class_entry)->default_properties, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
void do_add_static_array_element(znode *result, znode *offset, znode *expr)
{
- zval *element = (zval *) emalloc(sizeof(zval));
+ zval *element = ALLOC_ZVAL();
*element = expr->u.constant;
if (offset) {
znode lval;
if (fetch_type==ZEND_FETCH_STATIC && static_assignment) {
- zval *tmp = (zval *) emalloc(sizeof(zval));
+ zval *tmp = ALLOC_ZVAL();
convert_to_string(&varname->u.constant);
*tmp = static_assignment->u.constant;
EG(garbage)[EG(garbage_ptr)++] = (z); \
if (EG(garbage_ptr) == 4) { \
zval_dtor(EG(garbage)[0]); \
- efree(EG(garbage)[0]); \
+ FREE_ZVAL(EG(garbage)[0]); \
zval_dtor(EG(garbage)[1]); \
- efree(EG(garbage)[1]); \
+ FREE_ZVAL(EG(garbage)[1]); \
EG(garbage)[0] = EG(garbage)[2]; \
EG(garbage)[1] = EG(garbage)[3]; \
EG(garbage_ptr) -= 2; \
if (PZVAL_IS_LOCKED(value)) {
zval *orig_value = value;
- value = (zval *) emalloc(sizeof(zval));
+ value = ALLOC_ZVAL();
*value = *orig_value;
value->refcount=0;
zval_copy_ctor(value);
if (PZVAL_IS_LOCKED(value)) {
zval *orig_value = value;
- value = (zval *) emalloc(sizeof(zval));
+ value = ALLOC_ZVAL();
*value = *orig_value;
value->refcount=0;
zval_copy_ctor(value);
/* break missing intentionally */
case IS_CONST:
if (PZVAL_IS_REF(value) && value->refcount > 0) {
- variable_ptr = *variable_ptr_ptr = (zval *) emalloc(sizeof(zval));
+ variable_ptr = *variable_ptr_ptr = ALLOC_ZVAL();
*variable_ptr = *value;
zval_copy_ctor(variable_ptr);
variable_ptr->refcount=1;
value->refcount++;
break;
case IS_TMP_VAR:
- (*variable_ptr_ptr) = (zval *) emalloc(sizeof(zval));
+ (*variable_ptr_ptr) = ALLOC_ZVAL();
value->refcount=1;
**variable_ptr_ptr = *value;
break;
if (!PZVAL_IS_REF(container)) {
container->refcount--;
if (container->refcount>0) {
- container = *container_ptr = (zval *) emalloc(sizeof(zval));
+ container = *container_ptr = ALLOC_ZVAL();
container->is_ref=0;
}
container->refcount=1;
case IS_ARRAY:
if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !PZVAL_IS_REF(container)) {
container->refcount--;
- *container_ptr = (zval *) emalloc(sizeof(zval));
+ *container_ptr = ALLOC_ZVAL();
**container_ptr = *container;
container = *container_ptr;
INIT_PZVAL(container);
if (!PZVAL_IS_REF(container)) {
container->refcount--;
if (container->refcount>0) {
- container = *container_ptr = (zval *) emalloc(sizeof(zval));
+ container = *container_ptr = ALLOC_ZVAL();
container->is_ref=0;
}
container->refcount=1;
if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !PZVAL_IS_REF(container)) {
container->refcount--;
- *container_ptr = (zval *) emalloc(sizeof(zval));
+ *container_ptr = ALLOC_ZVAL();
**container_ptr = *container;
container = *container_ptr;
INIT_PZVAL(container);
#endif
if (op_array->uses_globals) {
- zval *globals = (zval *) emalloc(sizeof(zval));
+ zval *globals = ALLOC_ZVAL();
globals->refcount=1;
globals->is_ref=1;
globals->type = IS_ARRAY;
globals->value.ht = &EG(symbol_table);
if (zend_hash_add(EG(active_symbol_table), "GLOBALS", sizeof("GLOBALS"), &globals, sizeof(zval *), NULL)==FAILURE) {
- efree(globals);
+ FREE_ZVAL(globals);
}
}
zval *orig_var=*var_ptr;
(*var_ptr)->refcount--;
- *var_ptr = (zval *) emalloc(sizeof(zval));
+ *var_ptr = ALLOC_ZVAL();
**var_ptr = *orig_var;
zendi_zval_copy_ctor(**var_ptr);
(*var_ptr)->refcount=1;
zval *orig_var = *var_ptr;
(*var_ptr)->refcount--;
- *var_ptr = (zval *) emalloc(sizeof(zval));
+ *var_ptr = ALLOC_ZVAL();
**var_ptr = *orig_var;
zendi_zval_copy_ctor(**var_ptr);
(*var_ptr)->refcount=1;
Ts[opline->result.u.var].var.ptr_ptr = &Ts[opline->result.u.var].var.ptr;
if (function_state.function->type==ZEND_INTERNAL_FUNCTION) {
- Ts[opline->result.u.var].var.ptr = (zval *)emalloc(sizeof(zval));
+ Ts[opline->result.u.var].var.ptr = ALLOC_ZVAL();
INIT_ZVAL(*(Ts[opline->result.u.var].var.ptr));
((zend_internal_function *) function_state.function)->handler(opline->extended_value, Ts[opline->result.u.var].var.ptr, &EG(regular_list), &EG(persistent_list), object.ptr, return_value_used);
if (object.ptr) {
zend_execute(EG(active_op_array) ELS_CC);
if (return_value_used && !Ts[opline->result.u.var].var.ptr) {
- Ts[opline->result.u.var].var.ptr = (zval *) emalloc(sizeof(zval));
+ Ts[opline->result.u.var].var.ptr = ALLOC_ZVAL();
INIT_ZVAL(*Ts[opline->result.u.var].var.ptr);
} else if (!return_value_used && Ts[opline->result.u.var].var.ptr) {
zval_ptr_dtor(&Ts[opline->result.u.var].var.ptr);
}
EG(active_symbol_table) = calling_symbol_table;
} else { /* ZEND_OVERLOADED_FUNCTION */
- Ts[opline->result.u.var].var.ptr = (zval *)emalloc(sizeof(zval));
+ Ts[opline->result.u.var].var.ptr = ALLOC_ZVAL();
INIT_ZVAL(*(Ts[opline->result.u.var].var.ptr));
call_overloaded_function(opline->extended_value, Ts[opline->result.u.var].var.ptr, &EG(regular_list), &EG(persistent_list) ELS_CC);
efree(fbc);
if (!EG(free_op1)) { /* Not a temp var */
if (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 0) {
- *(EG(return_value_ptr_ptr)) = (zval *)emalloc(sizeof(zval));
+ *(EG(return_value_ptr_ptr)) = ALLOC_ZVAL();
**EG(return_value_ptr_ptr) = *retval_ptr;
(*EG(return_value_ptr_ptr))->is_ref = 0;
(*EG(return_value_ptr_ptr))->refcount = 1;
retval_ptr->refcount++;
}
} else {
- *(EG(return_value_ptr_ptr))= (zval *)emalloc(sizeof(zval));
+ *(EG(return_value_ptr_ptr))= ALLOC_ZVAL();
**EG(return_value_ptr_ptr) = *retval_ptr;
(*EG(return_value_ptr_ptr))->refcount = 1;
(*EG(return_value_ptr_ptr))->is_ref = 0;
zend_error(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num);
}
{
- zval *valptr = (zval *) emalloc(sizeof(zval));
+ zval *valptr = ALLOC_ZVAL();
*valptr = Ts[opline->op1.u.var].tmp_var;
INIT_PZVAL(valptr);
RESUME_GARBAGE();
if (varptr == &EG(uninitialized_zval)) {
- varptr = (zval *) emalloc(sizeof(zval));
+ varptr = ALLOC_ZVAL();
INIT_ZVAL(*varptr);
varptr->refcount = 0;
} else if (PZVAL_IS_REF(varptr)) {
zval *original_var = varptr;
- varptr = (zval *) emalloc(sizeof(zval));
+ varptr = ALLOC_ZVAL();
*varptr = *original_var;
varptr->is_ref = 0;
varptr->refcount = 0;
/* code to break away this variable */
if (varptr->refcount>1) {
varptr->refcount--;
- *varptr_ptr = (zval *) emalloc(sizeof(zval));
+ *varptr_ptr = ALLOC_ZVAL();
**varptr_ptr = *varptr;
varptr = *varptr_ptr;
varptr->refcount = 1;
break;
}
if (opline->op2.u.constant.type == IS_CONSTANT) {
- zval *default_value = (zval *) emalloc(sizeof(zval));
+ zval *default_value = ALLOC_ZVAL();
zval tmp;
*default_value = opline->op2.u.constant;
}
}
if (opline->op1.op_type == IS_TMP_VAR) { /* temporary variable */
- zval *new_expr = (zval *) emalloc(sizeof(zval));
+ zval *new_expr = ALLOC_ZVAL();
*new_expr = *expr_ptr;
expr_ptr = new_expr;
}
expr_ptr->refcount++;
} else if (PZVAL_IS_REF(expr_ptr)) {
- zval *new_expr = (zval *) emalloc(sizeof(zval));
+ zval *new_expr = ALLOC_ZVAL();
*new_expr = *expr_ptr;
expr_ptr = new_expr;
}
} else { /* return value is used */
if (!Ts[opline->result.u.var].var.ptr) { /* there was no return statement */
- Ts[opline->result.u.var].var.ptr = (zval *) emalloc(sizeof(zval));
+ Ts[opline->result.u.var].var.ptr = ALLOC_ZVAL();
INIT_PZVAL(Ts[opline->result.u.var].var.ptr);
Ts[opline->result.u.var].var.ptr->value.lval = 1;
Ts[opline->result.u.var].var.ptr->type = IS_LONG;
efree(new_op_array);
} else {
if (return_value_used) {
- Ts[opline->result.u.var].var.ptr = (zval *) emalloc(sizeof(zval));
+ Ts[opline->result.u.var].var.ptr = ALLOC_ZVAL();
INIT_ZVAL(*Ts[opline->result.u.var].var.ptr);
}
}
(*value)->refcount++;
zend_hash_index_update(result->value.ht, 0, value, sizeof(zval *), NULL);
- key = (zval *) emalloc(sizeof(zval));
+ key = ALLOC_ZVAL();
INIT_PZVAL(key);
switch (zend_hash_get_current_key(array->value.ht, &str_key, &int_key)) {
case HASH_KEY_IS_STRING:
#endif
while (EG(garbage_ptr)--) {
zval_dtor(EG(garbage)[EG(garbage_ptr)]);
- efree(EG(garbage)[EG(garbage_ptr)]);
+ FREE_ZVAL(EG(garbage)[EG(garbage_ptr)]);
}
zend_hash_destroy(&EG(imported_files));
ELS_FETCH();
if (p!=EG(uninitialized_zval_ptr)) {
- efree(p);
+ FREE_ZVAL(p);
}
}
if (no_separation) {
return FAILURE;
}
- new_zval = (zval *) emalloc(sizeof(zval));
+ new_zval = ALLOC_ZVAL();
*new_zval = **params[i];
zval_copy_ctor(new_zval);
new_zval->refcount = 1;
(*params[i])->refcount++;
param = *params[i];
} else {
- param = (zval *) emalloc(sizeof(zval));
+ param = ALLOC_ZVAL();
*param = **(params[i]);
INIT_PZVAL(param);
}
EG(active_symbol_table) = (HashTable *) emalloc(sizeof(HashTable));
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
if (object) {
- zval *dummy = (zval *) emalloc(sizeof(zval)), **this_ptr;
+ zval *dummy = ALLOC_ZVAL(), **this_ptr;
INIT_ZVAL(*dummy);
variable_ptr->refcount--;
if (variable_ptr->refcount==0) {
zendi_zval_dtor(*variable_ptr);
- efree(variable_ptr);
+ FREE_ZVAL(variable_ptr);
}
if (!PZVAL_IS_REF(value_ptr)) {
/* break it away */
value_ptr->refcount--;
if (value_ptr->refcount>0) {
- *value_ptr_ptr = (zval *) emalloc(sizeof(zval));
+ *value_ptr_ptr = ALLOC_ZVAL();
**value_ptr_ptr = *value_ptr;
value_ptr = *value_ptr_ptr;
zendi_zval_copy_ctor(*value_ptr);
static void convert_scalar_to_array(zval *op, int type)
{
- zval *entry = (zval *) emalloc(sizeof(zval));
+ zval *entry = ALLOC_ZVAL();
*entry = *op;
INIT_PZVAL(entry);
(*p)->refcount--;
if ((*p)->refcount==0) {
zval_dtor(*p);
- efree(*p);
+ FREE_ZVAL(*p);
}
}