From: Andi Gutmans Date: Thu, 10 Feb 2000 05:41:05 +0000 (+0000) Subject: - Cleanup the code X-Git-Tag: BEFORE_SAPIFICATION_FEB_10_2000~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39c46878169dd5642b5dcda660c038489a70efb7;p=php - Cleanup the code --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 020d894127..6fa140cc16 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2127,22 +2127,19 @@ send_by_ref: zval *array_ptr; HashTable *fe_ht; - if ((opline->op1.op_type == IS_CONST) || (opline->op1.op_type == IS_TMP_VAR)) { - array_ptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R); - if (EG(free_op1)) { /* IS_TMP_VAR */ - zval *tmp; - - ALLOC_ZVAL(tmp); - *tmp = *array_ptr; - INIT_PZVAL(tmp); - array_ptr = tmp; - } else { /* IS_CONST */ - array_ptr->refcount++; - } - } else { - array_ptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R); + array_ptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R); + + if (EG(free_op1)) { /* IS_TMP_VAR */ + zval *tmp; + + ALLOC_ZVAL(tmp); + *tmp = *array_ptr; + INIT_PZVAL(tmp); + array_ptr = tmp; + } else { /* IS_CONST */ array_ptr->refcount++; } + PZVAL_LOCK(array_ptr); Ts[opline->result.u.var].var.ptr = array_ptr; Ts[opline->result.u.var].var.ptr_ptr = &Ts[opline->result.u.var].var.ptr;