/* Variable information */
zvalue_value value; /* value */
unsigned char type; /* active type */
- struct {
- unsigned int is_ref:1;
- } EA;
+ unsigned char is_ref;
short refcount;
};
#define INIT_PZVAL(z) \
(z)->refcount = 1; \
- (z)->EA.is_ref = 0;
+ (z)->is_ref = 0;
#define MAKE_STD_ZVAL(zv) \
zv = (zval *) emalloc(sizeof(zval)); \
**(ppzv) = *orig_ptr; \
zval_copy_ctor(*(ppzv)); \
(*(ppzv))->refcount=1; \
- (*(ppzv))->EA.is_ref = 0; \
+ (*(ppzv))->is_ref = 0; \
} \
}
if (zend_hash_find(symtable, (name), (name_length), (void **) &orig_var)==SUCCESS \
&& PZVAL_IS_REF(*orig_var)) { \
var->refcount = (*orig_var)->refcount; \
- var->EA.is_ref = 1; \
+ var->is_ref = 1; \
\
zval_dtor(*orig_var); \
**orig_var = *var; \
entry = *entry_ptr;
/* add value elements */
- if (entry->EA.is_ref) {
+ if (entry->is_ref) {
tmp = (zval *)emalloc(sizeof(zval));
*tmp = *entry;
zval_copy_ctor(tmp);
- tmp->EA.is_ref=0;
+ tmp->is_ref=0;
tmp->refcount=0;
entry=tmp;
}
(ai).ptr = NULL; \
}
-#define PZVAL_IS_REF(z) ((z)->EA.is_ref)
+#define PZVAL_IS_REF(z) ((z)->is_ref)
#define PZVAL_LOCK(z) ((z)->refcount++)
#define PZVAL_UNLOCK(z) ((z)->refcount--)
case IS_OVERLOADED_OBJECT:
Ts[node->u.var].tmp_var = get_overloaded_property(ELS_C);
Ts[node->u.var].tmp_var.refcount=1;
- Ts[node->u.var].tmp_var.EA.is_ref=1;
+ Ts[node->u.var].tmp_var.is_ref=1;
return &Ts[node->u.var].tmp_var;
break;
case IS_STRING_OFFSET: {
}
zval_ptr_dtor(&str);
T->tmp_var.refcount=1;
- T->tmp_var.EA.is_ref=1;
+ T->tmp_var.is_ref=1;
T->tmp_var.type = IS_STRING;
return &T->tmp_var;
}
zendi_zval_dtor(*variable_ptr);
*variable_ptr = *value;
variable_ptr->refcount = refcount;
- variable_ptr->EA.is_ref = 1;
+ variable_ptr->is_ref = 1;
if (type!=IS_TMP_VAR) {
zendi_zval_copy_ctor(*variable_ptr);
zval_ptr_dtor(&value);
break;
}
}
- (*variable_ptr_ptr)->EA.is_ref=0;
+ (*variable_ptr_ptr)->is_ref=0;
}
if (result) {
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
container->refcount--;
if (container->refcount>0) {
container = *container_ptr = (zval *) emalloc(sizeof(zval));
- container->EA.is_ref=0;
+ container->is_ref=0;
}
container->refcount=1;
}
container->refcount--;
if (container->refcount>0) {
container = *container_ptr = (zval *) emalloc(sizeof(zval));
- container->EA.is_ref=0;
+ container->is_ref=0;
}
container->refcount=1;
}
zval *globals = (zval *) emalloc(sizeof(zval));
globals->refcount=1;
- globals->EA.is_ref=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) {
*object.ptr_ptr = tmp;
}
object.ptr->refcount = 1;
- object.ptr->EA.is_ref = 1;
+ object.ptr->is_ref = 1;
}
*this_ptr = object.ptr;
object.ptr->refcount++;
varptr = (zval *) emalloc(sizeof(zval));
var_uninit(varptr);
varptr->refcount=0;
- varptr->EA.is_ref=0;
+ varptr->is_ref=0;
} else if (PZVAL_IS_REF(varptr)) {
zval *original_var = varptr;
varptr = (zval *) emalloc(sizeof(zval));
*varptr = *original_var;
- varptr->EA.is_ref = 0;
+ varptr->is_ref = 0;
varptr->refcount = 0;
zval_copy_ctor(varptr);
}
varptr->refcount = 1;
zval_copy_ctor(varptr);
}
- varptr->EA.is_ref = 1;
+ varptr->is_ref = 1;
/* at the end of this code refcount is always 1 */
}
varptr->refcount++;
*default_value = tmp;
}
default_value->refcount=0;
- default_value->EA.is_ref=0;
+ default_value->is_ref=0;
param = &default_value;
assignment_value = default_value;
} else {
}
object_init_ex(&Ts[opline->result.u.var].tmp_var, ce);
Ts[opline->result.u.var].tmp_var.refcount=1;
- Ts[opline->result.u.var].tmp_var.EA.is_ref=1;
+ Ts[opline->result.u.var].tmp_var.is_ref=1;
zval_dtor(&class_name);
FREE_OP(&opline->op1, EG(free_op1));
}
if (!PZVAL_IS_REF(expr_ptr)) {
SEPARATE_ZVAL(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
- expr_ptr->EA.is_ref = 1;
+ expr_ptr->is_ref = 1;
}
expr_ptr->refcount++;
} else if (PZVAL_IS_REF(expr_ptr)) {
var_uninit(&EG(uninitialized_zval));
var_uninit(&EG(error_zval));
EG(uninitialized_zval).refcount = 1;
- EG(uninitialized_zval).EA.is_ref=0;
+ EG(uninitialized_zval).is_ref=0;
EG(uninitialized_zval_ptr)=&EG(uninitialized_zval);
EG(error_zval).refcount = 1;
- EG(error_zval).EA.is_ref=0;
+ EG(error_zval).is_ref=0;
EG(error_zval_ptr)=&EG(error_zval);
EG(destroying_function_symbol_table) = 0;
zend_ptr_stack_init(&EG(arg_types_stack));
*params[i] = new_zval;
}
(*params[i])->refcount++;
- (*params[i])->EA.is_ref = 1;
+ (*params[i])->is_ref = 1;
param = *params[i];
} else if (*params[i] != &EG(uninitialized_zval)) {
(*params[i])->refcount++;
zendi_zval_copy_ctor(*value_ptr);
}
value_ptr->refcount = 1;
- value_ptr->EA.is_ref = 1;
+ value_ptr->is_ref = 1;
}
*variable_ptr_ptr = value_ptr;
while (opline<end) {
if (opline->op1.op_type==IS_CONST) {
- opline->op1.u.constant.EA.is_ref = 1;
+ opline->op1.u.constant.is_ref = 1;
}
if (opline->op2.op_type==IS_CONST) {
- opline->op2.u.constant.EA.is_ref = 1;
+ opline->op2.u.constant.is_ref = 1;
}
opline++;
}
#define convert_to_long_ex(ppzv) \
if ((*ppzv)->type!=IS_LONG) { \
- if (!(*ppzv)->EA.is_ref) { \
+ if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_long(*ppzv); \
#define convert_to_double_ex(ppzv) \
if ((*ppzv)->type!=IS_DOUBLE) { \
- if (!(*ppzv)->EA.is_ref) { \
+ if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_double(*ppzv); \
#define convert_to_string_ex(ppzv) \
if ((*ppzv)->type!=IS_STRING) { \
- if (!(*ppzv)->EA.is_ref) { \
+ if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_string(*ppzv); \
#define convert_to_array_ex(ppzv) \
if ((*ppzv)->type!=IS_ARRAY) { \
- if (!(*ppzv)->EA.is_ref) { \
+ if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_array(*ppzv); \
#define convert_to_object_ex(ppzv) \
if ((*ppzv)->type!=IS_OBJECT) { \
- if (!(*ppzv)->EA.is_ref) { \
+ if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_object(*ppzv); \
#define convert_to_boolean_ex(ppzv) \
if ((*ppzv)->type!=IS_BOOL) { \
- if (!(*ppzv)->EA.is_ref) { \
+ if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_boolean(*ppzv); \