]> granicus.if.org Git - php/commitdiff
- Unused results should be marked with EXT_TYPE_UNUSED and not IS_UNUSED
authorAndi Gutmans <andi@php.net>
Mon, 14 Aug 2000 04:10:02 +0000 (04:10 +0000)
committerAndi Gutmans <andi@php.net>
Mon, 14 Aug 2000 04:10:02 +0000 (04:10 +0000)
Zend/zend_compile.c
Zend/zend_execute.h

index 4061ccfa4be0225888510adf84f43cda46ff1ff7..8e7f185b78b8a4cbf0d5fef1b3b59a73b3eb47e7 100644 (file)
@@ -320,7 +320,8 @@ void do_assign_ref(znode *result, znode *lvar, znode *rvar CLS_DC)
                opline->result.u.var = get_temporary_variable(CG(active_op_array));
                *result = opline->result;
        } else {
-               SET_UNUSED(opline->result);
+               /* SET_UNUSED(opline->result); */
+               opline->result.u.EA.type |= EXT_TYPE_UNUSED;
        }
        opline->op1 = *lvar;
        opline->op2 = *rvar;
index 0a85b843b0bc179294421f32767d81e0fbf60adb..8fcd5c0ea997b5eef4d9258402df5582e7ee16ac 100644 (file)
@@ -216,7 +216,7 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var
                (*variable_ptr_ptr)->is_ref = 1;
        }
 
-       if (result && (result->op_type != IS_UNUSED)) {
+       if (result && !(result->u.EA.type & EXT_TYPE_UNUSED)) {
                Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
                SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
                AI_USE_PTR(Ts[result->u.var].var);