Lines Matching refs:p

565 ZEND_API int zval_update_constant_ex(zval *p, zend_class_entry *scope) /* {{{ */  in zval_update_constant_ex()  argument
571 if (Z_TYPE_P(p) == IS_CONSTANT) { in zval_update_constant_ex()
572 if (IS_CONSTANT_VISITED(p)) { in zval_update_constant_ex()
573 zend_throw_error(NULL, "Cannot declare self-referencing constant '%s'", Z_STRVAL_P(p)); in zval_update_constant_ex()
576 inline_change = (Z_TYPE_FLAGS_P(p) & IS_TYPE_IMMUTABLE) == 0; in zval_update_constant_ex()
577 SEPARATE_ZVAL_NOREF(p); in zval_update_constant_ex()
578 MARK_CONSTANT_VISITED(p); in zval_update_constant_ex()
579 if (Z_CONST_FLAGS_P(p) & IS_CONSTANT_CLASS) { in zval_update_constant_ex()
582 zend_string_release(Z_STR_P(p)); in zval_update_constant_ex()
585 ZVAL_STR_COPY(p, scope->name); in zval_update_constant_ex()
587 ZVAL_EMPTY_STRING(p); in zval_update_constant_ex()
589 …} else if (UNEXPECTED((const_value = zend_get_constant_ex(Z_STR_P(p), scope, Z_CONST_FLAGS_P(p))) … in zval_update_constant_ex()
591 RESET_CONSTANT_VISITED(p); in zval_update_constant_ex()
593 } else if ((colon = (char*)zend_memrchr(Z_STRVAL_P(p), ':', Z_STRLEN_P(p)))) { in zval_update_constant_ex()
594 zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(p)); in zval_update_constant_ex()
595 RESET_CONSTANT_VISITED(p); in zval_update_constant_ex()
598 if ((Z_CONST_FLAGS_P(p) & IS_CONSTANT_UNQUALIFIED) == 0) { in zval_update_constant_ex()
599 zend_throw_error(NULL, "Undefined constant '%s'", Z_STRVAL_P(p)); in zval_update_constant_ex()
600 RESET_CONSTANT_VISITED(p); in zval_update_constant_ex()
603 zend_string *save = Z_STR_P(p); in zval_update_constant_ex()
604 char *actual = Z_STRVAL_P(p); in zval_update_constant_ex()
605 size_t actual_len = Z_STRLEN_P(p); in zval_update_constant_ex()
609 actual_len -= (actual - Z_STRVAL_P(p)); in zval_update_constant_ex()
614 RESET_CONSTANT_VISITED(p); in zval_update_constant_ex()
619 ZVAL_STRINGL(p, actual, actual_len); in zval_update_constant_ex()
622 ZVAL_STRINGL(p, actual, actual_len); in zval_update_constant_ex()
625 Z_TYPE_INFO_P(p) = Z_REFCOUNTED_P(p) ? in zval_update_constant_ex()
633 zend_string_release(Z_STR_P(p)); in zval_update_constant_ex()
635 ZVAL_COPY_VALUE(p, const_value); in zval_update_constant_ex()
636 zval_opt_copy_ctor(p); in zval_update_constant_ex()
638 } else if (Z_TYPE_P(p) == IS_CONSTANT_AST) { in zval_update_constant_ex()
641 inline_change = (Z_TYPE_FLAGS_P(p) & IS_TYPE_IMMUTABLE) == 0; in zval_update_constant_ex()
642 if (UNEXPECTED(zend_ast_evaluate(&tmp, Z_ASTVAL_P(p), scope) != SUCCESS)) { in zval_update_constant_ex()
646 zval_ptr_dtor(p); in zval_update_constant_ex()
648 ZVAL_COPY_VALUE(p, &tmp); in zval_update_constant_ex()