Skip to content

Commit

Permalink
- Unused results should be marked with EXT_TYPE_UNUSED and not IS_UNUSED
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Gutmans committed Aug 14, 2000
1 parent e871d2f commit e1a3604
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e1a3604

Please sign in to comment.