zend_string_release(Z_STR_P(p));
}
ZVAL_COPY_VALUE(p, const_value);
- if (Z_OPT_CONSTANT_P(p)) {
- if (UNEXPECTED(zval_update_constant_ex(p, scope) != SUCCESS)) {
- RESET_CONSTANT_VISITED(p);
- return FAILURE;
- }
- }
zval_opt_copy_ctor(p);
}
} else if (Z_TYPE_P(p) == IS_CONSTANT_AST) {
if (!memchr(Z_STRVAL_P(name), ':', Z_STRLEN_P(name))
&& (c = zend_get_constant(Z_STR_P(name))) != 0) {
if (Z_TYPE_P(c) != IS_STRING) {
- ZVAL_COPY_VALUE(&tmp, c);
+ ZVAL_COPY(&tmp, c);
if (Z_OPT_CONSTANT(tmp)) {
zval_update_constant_ex(&tmp, NULL);
}
- zval_opt_copy_ctor(&tmp);
convert_to_string(&tmp);
c = &tmp;
}
return;
}
- ZVAL_COPY_VALUE(return_value, RT_CONSTANT(¶m->fptr->op_array, precv->op2));
+ ZVAL_COPY(return_value, RT_CONSTANT(¶m->fptr->op_array, precv->op2));
if (Z_CONSTANT_P(return_value)) {
zval_update_constant_ex(return_value, param->fptr->common.scope);
- } else {
- zval_copy_ctor(return_value);
}
}
/* }}} */
scope = zend_get_executed_scope();
c = zend_get_constant_ex(const_name, scope, ZEND_FETCH_CLASS_SILENT);
if (c) {
- ZVAL_COPY_VALUE(return_value, c);
+ ZVAL_COPY(return_value, c);
if (Z_CONSTANT_P(return_value)) {
if (UNEXPECTED(zval_update_constant_ex(return_value, scope) != SUCCESS)) {
return;
}
}
- zval_copy_ctor(return_value);
} else {
php_error_docref(NULL, E_WARNING, "Couldn't find constant %s", ZSTR_VAL(const_name));
RETURN_NULL();