non_empty_parameter_list:
- T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
- | '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
- | T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
- | T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
- | T_VARIABLE '=' T_UNSET { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
+ T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
+ | '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
+ | T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
+ | T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
+ | T_VARIABLE '=' T_UNSET { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.EA=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
| non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
static_array_pair_list:
- /* empty */ { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); }
+ /* empty */ { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.EA=0; array_init(&$$.u.constant); }
| non_empty_static_array_pair_list { $$ = $1; }
;
non_empty_static_array_pair_list:
non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { do_add_static_array_element(&$$, &$3, &$5); }
| non_empty_static_array_pair_list ',' static_scalar { do_add_static_array_element(&$$, NULL, &$3); }
- | static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); }
- | static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, NULL, &$1); }
+ | static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.EA=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); }
+ | static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.EA=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, NULL, &$1); }
;
expr:
/* Variable information */
zvalue_value value; /* value */
unsigned char type; /* active type */
- unsigned char is_ref;
+ unsigned char EA;
short refcount;
};
#define MAKE_STD_ZVAL(zv) \
zv = (zval *) emalloc(sizeof(zval)); \
zv->refcount = 1; \
- zv->is_ref = 0;
+ zv->EA = 0;
int zend_startup(zend_utility_functions *utility_functions, char **extensions);
while (param_count>0) {
param = va_arg(ptr, zval **);
param_ptr = *(p-param_count);
- if (!param_ptr->is_ref && param_ptr->refcount>1) {
+ if (!param_ptr->EA && param_ptr->refcount>1) {
zval *new_tmp;
new_tmp = (zval *) emalloc(sizeof(zval));
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
new_tmp->refcount = 1;
- new_tmp->is_ref = 0;
+ new_tmp->EA = 0;
param_ptr = new_tmp;
((zval *) *(p-param_count))->refcount--;
*(p-param_count) = param_ptr;
while (param_count>0) {
param_ptr = *(p-param_count);
- if (!param_ptr->is_ref && param_ptr->refcount>1) {
+ if (!param_ptr->EA && param_ptr->refcount>1) {
zval *new_tmp;
new_tmp = (zval *) emalloc(sizeof(zval));
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
new_tmp->refcount = 1;
- new_tmp->is_ref = 0;
+ new_tmp->EA = 0;
param_ptr = new_tmp;
((zval *) *(p-param_count))->refcount--;
*(p-param_count) = param_ptr;
return FAILURE;
}
arg = (zval *) *(p-arg_count+n-1);
- return arg->is_ref;
+ return arg->EA;
}
tmp->type = IS_LONG;
tmp->value.lval = n;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
tmp->type = IS_LONG;
tmp->value.lval = n;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
tmp->type = IS_LONG;
tmp->value.lval = n;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
}
tmp->type = IS_LONG;
tmp->value.lval= l;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
tmp->type = IS_DOUBLE;
tmp->value.dval= d;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
tmp->type = IS_LONG;
tmp->value.lval = n;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
tmp->value.str.val = str;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
var->value.str.val = (str); \
var->value.str.len = strlen((str)); \
var->type = IS_STRING; \
- var->is_ref=0; \
+ var->EA=0; \
var->refcount=1; \
zend_hash_update(&EG(symbol_table), (n), strlen((n))+1, &var, sizeof(zval *), NULL); \
} \
var->value.str.val = (v); \
var->value.str.len = (l); \
var->type = IS_STRING; \
- var->is_ref=0; \
+ var->EA=0; \
var->refcount=1; \
zend_hash_update(&EG(symbol_table), name, strlen(name)+1, &var, sizeof(zval *), NULL); \
} \
\
var->value.lval = (v); \
var->type = IS_LONG; \
- var->is_ref=0; \
+ var->EA=0; \
var->refcount=1; \
zend_hash_update(&EG(symbol_table), (n), strlen((n))+1, &var, sizeof(zval *), NULL); \
} \
\
var->value.dval = (v); \
var->type = IS_DOUBLE; \
- var->is_ref=0; \
+ var->EA=0; \
var->refcount=1; \
zend_hash_update(&EG(symbol_table)), (n), strlen((n))+1, &var, sizeof(zval *), NULL); \
} \
var_uninit(&opline->op1.u.constant);
opline->op1.op_type = IS_CONST;
opline->op1.u.constant.refcount=1;
- opline->op1.u.constant.is_ref=0;
+ opline->op1.u.constant.EA=0;
}
SET_UNUSED(opline->op2);
}
opline->op2.u.constant.type = IS_LONG;
opline->op2.u.constant.value.lval = 1;
opline->op2.u.constant.refcount=1;
- opline->op2.u.constant.is_ref=0;
+ opline->op2.u.constant.EA=0;
opline->op2.op_type = IS_CONST;
}
}
opline->op1.u.constant.type = IS_LONG;
opline->op1.u.constant.value.lval = 1;
opline->op1.u.constant.refcount=1;
- opline->op1.u.constant.is_ref=0;
+ opline->op1.u.constant.EA=0;
SET_UNUSED(opline->op2);
switch_entry_ptr->default_case = next_op_number;
opline->op1.u.constant.value.str.val = estrndup("shell_exec",sizeof("shell_exec")-1);
opline->op1.u.constant.value.str.len = sizeof("shell_exec")-1;
opline->op1.u.constant.refcount = 1;
- opline->op1.u.constant.is_ref = 0;
+ opline->op1.u.constant.EA = 0;
opline->op1.u.constant.type = IS_STRING;
opline->op1.op_type = IS_CONST;
opline->extended_value = 1;
opline->op2.u.constant.type = IS_LONG;
opline->op2.u.constant.value.lval = *((int *) dimension->data);
opline->op2.u.constant.refcount = 1;
- opline->op2.u.constant.is_ref = 0;
+ opline->op2.u.constant.EA = 0;
if (le == CG(list_llist).tail) {
opline->extended_value = ZEND_FETCH_STANDARD;
} else {
}
zendlval->u.constant.refcount = 1;
- zendlval->u.constant.is_ref = 0;
+ zendlval->u.constant.EA = 0;
zendlval->op_type = IS_CONST;
return retval;
}
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.is_ref=1;
+ Ts[node->u.var].tmp_var.EA=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.is_ref=1;
+ T->tmp_var.EA=1;
T->tmp_var.type = IS_STRING;
return &T->tmp_var;
}
return;
}
- if (variable_ptr->is_ref) {
+ if (variable_ptr->EA) {
if (variable_ptr!=value) {
short refcount=variable_ptr->refcount;
zendi_zval_dtor(*variable_ptr);
*variable_ptr = *value;
variable_ptr->refcount = refcount;
- variable_ptr->is_ref=1;
+ variable_ptr->EA=1;
if (type!=IS_TMP_VAR) {
zendi_zval_copy_ctor(*variable_ptr);
}
case IS_CONST:
if (variable_ptr==value) {
variable_ptr->refcount++;
- } else if (value->is_ref) {
+ } else if (value->EA) {
zval tmp = *value;
tmp = *value;
switch (type) {
case IS_VAR:
case IS_CONST:
- if (value->is_ref) {
+ if (value->EA) {
variable_ptr = *variable_ptr_ptr = (zval *) emalloc(sizeof(zval));
*variable_ptr = *value;
zval_copy_ctor(variable_ptr);
break;
}
}
- (*variable_ptr_ptr)->is_ref=0;
+ (*variable_ptr_ptr)->EA=0;
}
if (result) {
Ts[result->u.var].var = variable_ptr_ptr;
switch (type) {
case BP_VAR_RW:
case BP_VAR_W:
- if (!container->is_ref) {
+ if (!container->EA) {
container->refcount--;
if (container->refcount>0) {
container = *container_ptr = (zval *) emalloc(sizeof(zval));
- container->is_ref=0;
+ container->EA=0;
}
container->refcount=1;
}
switch (container->type) {
case IS_ARRAY:
- if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !container->is_ref) {
+ if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !container->EA) {
container->refcount--;
*container_ptr = (zval *) emalloc(sizeof(zval));
**container_ptr = *container;
container = *container_ptr;
container->refcount=1;
- container->is_ref=0;
+ container->EA=0;
zendi_zval_copy_ctor(*container);
}
if (op2->op_type == IS_UNUSED) {
switch (type) {
case BP_VAR_RW:
case BP_VAR_W:
- if (!container->is_ref) {
+ if (!container->EA) {
container->refcount--;
if (container->refcount>0) {
container = *container_ptr = (zval *) emalloc(sizeof(zval));
- container->is_ref=0;
+ container->EA=0;
}
container->refcount=1;
}
}
- if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !container->is_ref) {
+ if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !container->EA) {
container->refcount--;
*container_ptr = (zval *) emalloc(sizeof(zval));
**container_ptr = *container;
container = *container_ptr;
container->refcount=1;
- container->is_ref=0;
+ container->EA=0;
zendi_zval_copy_ctor(*container);
}
INC_AI_COUNT(result);
zval *globals = (zval *) emalloc(sizeof(zval));
globals->refcount=1;
- globals->is_ref=1;
+ globals->EA=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) {
opline++;
continue;
}
- if (!(*var_ptr)->is_ref) {
+ if (!(*var_ptr)->EA) {
if ((*var_ptr)->refcount>1) {
zval *orig_var=*var_ptr;
zendi_zval_copy_ctor(Ts[opline->result.u.var].tmp_var);
break;
}
- if (!(*var_ptr)->is_ref) {
+ if (!(*var_ptr)->EA) {
if ((*var_ptr)->refcount>1) {
zval *orig_var = *var_ptr;
var_uninit(dummy);
dummy->refcount=1;
- dummy->is_ref=0;
+ dummy->EA=0;
zend_hash_update_ptr(function_state.function_symbol_table, "this", sizeof("this"), dummy, sizeof(zval *), (void **) &this_ptr);
zend_assign_to_variable_reference(NULL, this_ptr, object_ptr, NULL ELS_CC);
object_ptr = NULL;
*valptr = Ts[opline->op1.u.var].tmp_var;
valptr->refcount=1;
- valptr->is_ref=0;
+ valptr->EA=0;
zend_ptr_stack_push(&EG(argument_stack), valptr);
}
break;
varptr = (zval *) emalloc(sizeof(zval));
var_uninit(varptr);
varptr->refcount=0;
- varptr->is_ref=0;
- } else if (varptr->is_ref) {
+ varptr->EA=0;
+ } else if (varptr->EA) {
zval *original_var = varptr;
varptr = (zval *) emalloc(sizeof(zval));
*varptr = *original_var;
- varptr->is_ref = 0;
+ varptr->EA = 0;
varptr->refcount = 0;
zval_copy_ctor(varptr);
}
zval **varptr_ptr = get_zval_ptr_ptr(&opline->op1, Ts, BP_VAR_W);
zval *varptr = *varptr_ptr;
- if (!varptr->is_ref) {
+ if (!varptr->EA) {
/* code to break away this variable */
if (varptr->refcount>1) {
varptr->refcount--;
varptr->refcount = 1;
zval_copy_ctor(varptr);
}
- varptr->is_ref = 1;
+ varptr->EA = 1;
/* at the end of this code refcount is always 1 */
}
varptr->refcount++;
if (zend_ptr_stack_get_arg(opline->op1.u.constant.value.lval, (void **) ¶m ELS_CC)==FAILURE) {
zend_error(E_NOTICE, "Missing argument %d for %s()\n", opline->op1.u.constant.value.lval, get_active_function_name());
DEC_AI_COUNT();
- } else if ((*param)->is_ref) {
+ } else if ((*param)->EA) {
zend_assign_to_variable_reference(NULL, get_zval_ptr_ptr(&opline->result, Ts, BP_VAR_W), param, NULL ELS_CC);
} else {
zend_assign_to_variable(NULL, &opline->result, NULL, *param, IS_VAR, Ts ELS_CC);
*default_value = tmp;
}
default_value->refcount=0;
- default_value->is_ref=0;
+ default_value->EA=0;
param = &default_value;
assignment_value = default_value;
} else {
assignment_value = *param;
}
- if (assignment_value->is_ref) {
+ if (assignment_value->EA) {
zend_assign_to_variable_reference(NULL, get_zval_ptr_ptr(&opline->result, Ts, BP_VAR_W), param, NULL ELS_CC);
} else {
zend_assign_to_variable(NULL, &opline->result, NULL, assignment_value, IS_VAR, Ts ELS_CC);
*new_expr = *expr;
expr = new_expr;
expr->refcount=1;
- expr->is_ref=0;
+ expr->EA=0;
} else {
- if (expr->is_ref) {
+ if (expr->EA) {
zval *new_expr = (zval *) emalloc(sizeof(zval));
*new_expr = *expr;
expr = new_expr;
zendi_zval_copy_ctor(*expr);
expr->refcount=1;
- expr->is_ref=0;
+ expr->EA=0;
} else {
expr->refcount++;
}
key = (zval *) emalloc(sizeof(zval));
key->refcount=1;
- key->is_ref=0;
+ key->EA=0;
switch (zend_hash_get_current_key(array->value.ht, &str_key, &int_key)) {
case HASH_KEY_IS_STRING:
key->value.str.val = str_key;
var_uninit(&EG(uninitialized_zval));
var_uninit(&EG(error_zval));
EG(uninitialized_zval).refcount = 1;
- EG(uninitialized_zval).is_ref=0;
+ EG(uninitialized_zval).EA=0;
EG(uninitialized_zval_ptr)=&EG(uninitialized_zval);
EG(error_zval).refcount = 1;
- EG(error_zval).is_ref=0;
+ EG(error_zval).EA=0;
EG(error_zval_ptr)=&EG(error_zval);
zend_ptr_stack_init(&EG(arg_types_stack));
zend_stack_init(&EG(overloaded_objects_stack));
*p = c;
}
p->refcount = 1;
- p->is_ref = 0;
+ p->EA = 0;
}
}
param = (zval *) emalloc(sizeof(zval));
*param = *(params[i]);
param->refcount=1;
- param->is_ref=0;
+ param->EA=0;
zval_copy_ctor(param);
//zend_hash_next_index_insert_ptr(function_state.function_symbol_table, param, sizeof(zval *), NULL);
zend_ptr_stack_push(&EG(argument_stack), param);
var_uninit(dummy);
dummy->refcount=1;
- dummy->is_ref=0;
+ dummy->EA=0;
zend_hash_update_ptr(EG(active_symbol_table), "this", sizeof("this"), dummy, sizeof(zval *), (void **) &this_ptr);
zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC);
}
efree(variable_ptr);
}
- if (!value_ptr->is_ref) {
+ if (!value_ptr->EA) {
/* break it away */
value_ptr->refcount--;
if (value_ptr->refcount>0) {
zendi_zval_copy_ctor(*value_ptr);
}
value_ptr->refcount=1;
- value_ptr->is_ref=1;
+ value_ptr->EA=1;
}
*variable_ptr_ptr = value_ptr;
while (opline<end) {
if (opline->op1.op_type==IS_CONST) {
- opline->op1.u.constant.is_ref = 1;
+ opline->op1.u.constant.EA = 1;
}
if (opline->op2.op_type==IS_CONST) {
- opline->op2.u.constant.is_ref = 1;
+ opline->op2.u.constant.EA = 1;
}
opline++;
}
*entry = *op;
entry->refcount = 1;
- entry->is_ref = 0;
+ entry->EA = 0;
switch (type) {
case IS_ARRAY:
#if PHP_API_VERSION >= 19990421
element = emalloc(sizeof(pval));
- element->is_ref=0;
+ element->EA=0;
element->refcount=1;
#endif
if ((mode & OCI_NUM) || (! (mode & OCI_ASSOC))) { /* OCI_NUM is default */
oci8_make_pval(element,statement,column, "OCIFetchInto",mode);
#if PHP_API_VERSION >= 19990421
- element->is_ref = 0;
+ element->EA = 0;
element->refcount = 1;
_php3_hash_index_update(array->value.ht, i, (void *)&element, sizeof(pval*), NULL);
#else
#if PHP_API_VERSION >= 19990421
tmp = emalloc(sizeof(pval));
- tmp->is_ref = 0;
+ tmp->EA = 0;
tmp->refcount = 1;
#endif
array_init(tmp);
#if PHP_API_VERSION >= 19990421
- tmp->is_ref = 0;
+ tmp->EA = 0;
tmp->refcount = 1;
#endif
_php3_hash_index_update(outarrs[ i ]->value.ht, rows, (void *)element, sizeof(pval), NULL);
#else
element->refcount = 1;
- element->is_ref = 0;
+ element->EA = 0;
_php3_hash_index_update((*(outarrs[ i ]))->value.ht, rows, (void *)&element, sizeof(pval*), NULL);
#endif
}
} else {
#if PHP_API_VERSION >= 19990421
tmp = emalloc(sizeof(pval));
- tmp->is_ref = 0;
+ tmp->EA = 0;
tmp->refcount = 1;
#endif
for (i=0; i<num_subpats; i++) {
match_sets[i] = (zval *)emalloc(sizeof(zval));
array_init(match_sets[i]);
- match_sets[i]->is_ref = 0;
+ match_sets[i]->EA = 0;
match_sets[i]->refcount = 1;
}
}
/* Allocate the result set array */
result_set = emalloc(sizeof(zval));
array_init(result_set);
- result_set->is_ref = 0;
+ result_set->EA = 0;
result_set->refcount = 1;
/* Add all the subpatterns to it */
*object_handle = *return_value;
pval_copy_constructor(object_handle);
object_handle->refcount = 1;
- object_handle->is_ref=0;
+ object_handle->EA=0;
zend_hash_index_update(object->value.obj.properties, 0, &object_handle, sizeof(pval *), NULL);
pval_destructor(&function_name->element);
} else {
entry = *entry_ptr;
/* add value elements */
- if (entry->is_ref) {
+ if (entry->EA) {
tmp = (pval *)emalloc(sizeof(pval));
*tmp = *entry;
pval_copy_constructor(tmp);
- tmp->is_ref=0;
+ tmp->EA=0;
tmp->refcount=0;
entry=tmp;
}
*return_value = **entry;
pval_copy_constructor(return_value);
return_value->refcount=1;
- return_value->is_ref=0;
+ return_value->EA=0;
}
void array_current(INTERNAL_FUNCTION_PARAMETERS)
data = (zval *)emalloc(sizeof(zval));
*data = *entry;
zval_copy_ctor(data);
- data->is_ref = 0;
+ data->EA = 0;
data->refcount = 1;
zend_hash_update(EG(active_symbol_table), finalname,
data = (zval *)emalloc(sizeof(zval));
*data = *value;
zval_copy_ctor(data);
- data->is_ref = 0;
+ data->EA = 0;
data->refcount = 1;
zend_hash_update(return_value->value.ht, entry->value.str.val,
*return_value = **val;
zval_copy_ctor(return_value);
return_value->refcount=1;
- return_value->is_ref=0;
+ return_value->EA=0;
/* Delete the first or last value */
new_hash = _phpi_splice(stack->value.ht, (off_the_end) ? -1 : 0, 1, NULL, 0, NULL);
zend_hash_internal_pointer_reset(input->value.ht);
while(zend_hash_get_current_data(input->value.ht, (void **)&entry) == SUCCESS) {
new_val = (zval *)emalloc(sizeof(zval));
- new_val->is_ref = 0;
+ new_val->EA = 0;
new_val->refcount = 1;
switch (zend_hash_get_current_key(input->value.ht, &string_key, &num_key)) {
/* {{{ _php3_sock_destroy */
#ifndef ZTS
-static void _php3_msock_destroy(int *data)
+static int _php3_msock_destroy(int *data)
{
close(*data);
+ return 1;
}
#endif
/* }}} */
{
#ifndef ZTS
_php3_hash_init(&PG(ht_fsock_keys), 0, NULL, NULL, 1);
- _php3_hash_init(&PG(ht_fsock_socks), 0, NULL, (void (*)(void *))_php3_msock_destroy, 1);
+ _php3_hash_init(&PG(ht_fsock_socks), 0, NULL, (int (*)(void *))_php3_msock_destroy, 1);
#endif
return SUCCESS;
}
if (_php3_hash_find(return_value->value.ht,key,strlen(key) + 1,(void **) &element) == FAILURE) {
values = emalloc(sizeof(pval));
- values->is_ref = 0;
+ values->EA = 0;
values->refcount = 1;
if (array_init(values) == FAILURE) {
php3_error(E_ERROR, "Unable to initialize array");
postdata_ptr->value.str.val = (char *) estrdup(buf);
postdata_ptr->value.str.len = cnt;
postdata_ptr->refcount=1;
- postdata_ptr->is_ref=0;
+ postdata_ptr->EA=0;
_php3_hash_add(&symbol_table, "HTTP_FDF_DATA", sizeof("HTTP_FDF_DATA"), postdata_ptr, sizeof(pval *),NULL);
}
#endif
if (_php3_hash_find(EG(active_symbol_table), var, var_len+1, (void **) &arr_ptr) == FAILURE) {
arr1 = (pval *) emalloc(sizeof(pval));
arr1->refcount=1;
- arr1->is_ref=0;
+ arr1->EA=0;
if (array_init(arr1)==FAILURE) {
return;
}
if (track_vars_array) {
arr2 = (pval *) emalloc(sizeof(pval));
arr2->refcount=1;
- arr2->is_ref=0;
+ arr2->EA=0;
if (array_init(arr2)==FAILURE) {
return;
}
if (--(*arr_ptr) > 0) {
*arr_ptr = (pval *) emalloc(sizeof(pval));
(*arr_ptr)->refcount=1;
- (*arr_ptr)->is_ref=0;
+ (*arr_ptr)->EA=0;
} else {
pval_destructor(*arr_ptr);
}
if (track_vars_array) {
arr2 = (pval *) emalloc(sizeof(pval));
arr2->refcount=1;
- arr2->is_ref=0;
+ arr2->EA=0;
if (array_init(arr2)==FAILURE) {
return;
}
/* Now create the element */
entry = (pval *) emalloc(sizeof(pval));
entry->refcount=1;
- entry->is_ref=0;
+ entry->EA=0;
entry->value.str.val = val;
entry->value.str.len = val_len;
entry->type = IS_STRING;
entry->type = IS_STRING;
entry->refcount=1;
- entry->is_ref=0;
+ entry->EA=0;
entry->value.str.val = val;
entry->value.str.len = val_len;
_php3_hash_update(EG(active_symbol_table), var, var_len+1, (void *) &entry, sizeof(pval *),NULL);
array_ptr = (pval *) emalloc(sizeof(pval));
array_init(array_ptr);
array_ptr->refcount=1;
- array_ptr->is_ref=0;
+ array_ptr->EA=0;
switch (arg) {
case PARSE_POST:
_php3_hash_add(&EG(symbol_table), "HTTP_POST_VARS", sizeof("HTTP_POST_VARS"), &array_ptr, sizeof(pval *),NULL);
(*rval)->type = IS_LONG;
}
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
(*rval)->value.lval = atol(q + 2);
return 1;
(*p)++;
(*rval)->type = IS_DOUBLE;
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
(*rval)->value.dval = atof(q + 2);
return 1;
(*rval)->value.str.val = str;
(*rval)->value.str.len = i;
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
return 1;
case 'a':
(*rval)->type = IS_ARRAY;
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
(*p) += 2;
i = atoi(*p);
(*rval)->value.ht = (HashTable *) emalloc(sizeof(HashTable));
(*rval)->type = IS_OBJECT;
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
(*p) += 2;
i = atoi(*p);
(*rval)->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
ret->type = IS_LONG;
ret->value.lval = value;
- ret->is_ref = 0;
+ ret->EA = 0;
ret->refcount = 1;
return ret;
}
ret->type = IS_STRING;
ret->value.str.len = len;
- ret->is_ref = 0;
+ ret->EA = 0;
ret->refcount = 1;
ret->value.str.val = estrndup(str, len);
return ret;
return;
}
- values->is_ref = 0;
+ values->EA = 0;
values->refcount = 1;
_php3_hash_update(parser->info->value.ht, name, strlen(name)+1, (void *) &values, sizeof(pval*), (void **) &element);
int atcnt = 0;
tag = emalloc(sizeof(pval));
- tag->is_ref = 0;
+ tag->EA = 0;
tag->refcount = 1;
atr = emalloc(sizeof(pval));
- atr->is_ref = 0;
+ atr->EA = 0;
atr->refcount = 1;
array_init(tag);
tag = emalloc(sizeof(pval));
array_init(tag);
- tag->is_ref = 0;
+ tag->EA = 0;
tag->refcount = 1;
php3i_add_to_info(parser,((char *) name) + parser->toffset);
tmp->value.str.val = estrndup(p + 1, tmp->value.str.len);
tmp->type = IS_STRING;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
/* environmental variables never take precedence over get/post/cookie variables */
_php3_hash_add(&EG(symbol_table), t, p - *env + 1, &tmp, sizeof(pval *), NULL);
efree(t);
tmp->value.str.val = empty_string;
}
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
tmp->type = IS_STRING;
_php3_hash_update(&EG(symbol_table), t, strlen(t)+1, &tmp, sizeof(pval *), NULL);
}
tmp->value.str.len = strlen(((request_rec *) SG(server_context))->uri);
tmp->value.str.val = estrndup(((request_rec *) SG(server_context))->uri, tmp->value.str.len);
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
tmp->type = IS_STRING;
_php3_hash_update(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF"), (void *) &tmp, sizeof(pval *), NULL);
}
tmp->value.str.len = _php3_sprintf(tmp->value.str.val, "%s", (pi ? pi : "")); /* SAFE */
tmp->type = IS_STRING;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
#else
int l = 0;
char *sn;
tmp->value.str.len = _php3_sprintf(tmp->value.str.val, "%s%s", (sn ? sn : ""), (pi ? pi : "")); /* SAFE */
tmp->type = IS_STRING;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
#endif
_php3_hash_update(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF"), (void *) & tmp, sizeof(pval *), NULL);
}
} else {
arr->type = IS_ARRAY;
arr->refcount=1;
- arr->is_ref=0;
+ arr->EA=0;
_php3_hash_update(&EG(symbol_table), "argv", sizeof("argv"), &arr, sizeof(pval *), NULL);
}
/* now pick out individual entries */
tmp->value.str.len = strlen(ss);
tmp->value.str.val = estrndup(ss, tmp->value.str.len);
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
count++;
if (_php3_hash_next_index_insert(arr->value.ht, &tmp, sizeof(pval *), NULL)==FAILURE) {
if (tmp->type == IS_STRING) {
tmp->value.lval = count;
tmp->type = IS_LONG;
tmp->refcount=1;
- tmp->is_ref=0;
+ tmp->EA=0;
_php3_hash_add(&EG(symbol_table), "argc", sizeof("argc"), &tmp, sizeof(pval *), NULL);
}
http_post_vars = (pval *) emalloc(sizeof(pval));
array_init(http_post_vars);
http_post_vars->refcount=1;
- http_post_vars->is_ref=0;
+ http_post_vars->EA=0;
zend_hash_add(&EG(symbol_table), "HTTP_POST_VARS", sizeof("HTTP_POST_VARS"), &http_post_vars, sizeof(pval *), NULL);
}