From 39c46878169dd5642b5dcda660c038489a70efb7 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Thu, 10 Feb 2000 05:41:05 +0000 Subject: [PATCH] - Cleanup the code --- Zend/zend_execute.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) 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; -- 2.50.1