zval *cv = EX_VAR_NUM(0);
zval *end = cv + EX(func)->op_array.last_var;
while (EXPECTED(cv != end)) {
- zval_ptr_dtor(cv);
+ if (Z_REFCOUNTED_P(cv)) {
+ if (!Z_DELREF_P(cv)) {
+ zend_refcounted *r = Z_COUNTED_P(cv);
+ ZVAL_NULL(cv);
+ zval_dtor_func_for_ptr(r);
+ } else {
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(cv);
+ }
+ }
cv++;
}
}
zval *p = end + (ZEND_CALL_NUM_ARGS(call) - call->func->op_array.num_args);
do {
p--;
- i_zval_ptr_dtor(p ZEND_FILE_LINE_CC);
+ if (Z_REFCOUNTED_P(p)) {
+ if (!Z_DELREF_P(p)) {
+ zend_refcounted *r = Z_COUNTED_P(p);
+ ZVAL_NULL(p);
+ zval_dtor_func_for_ptr(r);
+ } else {
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(p);
+ }
+ }
} while (p != end);
}
}
do {
p--;
- zval_ptr_dtor_nogc(p);
+ if (Z_REFCOUNTED_P(p)) {
+ if (!Z_DELREF_P(p)) {
+ zend_refcounted *r = Z_COUNTED_P(p);
+ ZVAL_NULL(p);
+ zval_dtor_func_for_ptr(r);
+ }
+ }
} while (p != end);
}
}