Skip to content

Commit 90575d2

Browse files
committed
Review
1 parent 95237d5 commit 90575d2

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Zend/zend_API.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2953,7 +2953,7 @@ static zend_always_inline void zend_normalize_internal_type(zend_type *type) {
29532953
} ZEND_TYPE_FOREACH_END();
29542954
}
29552955

2956-
void zend_convert_internal_arg_info_type(zend_type *type)
2956+
ZEND_API void zend_convert_internal_arg_info_type(zend_type *type)
29572957
{
29582958
if (ZEND_TYPE_HAS_LITERAL_NAME(*type)) {
29592959
// gen_stubs.php does not support codegen for DNF types in arg infos.
@@ -2977,7 +2977,7 @@ void zend_convert_internal_arg_info_type(zend_type *type)
29772977
type->type_mask |= _ZEND_TYPE_NAME_BIT;
29782978
} else {
29792979
/* Union type */
2980-
zend_type_list *list = malloc(ZEND_TYPE_LIST_SIZE(num_types));
2980+
zend_type_list *list = pemalloc(ZEND_TYPE_LIST_SIZE(num_types), true);
29812981
list->num_types = num_types;
29822982
ZEND_TYPE_SET_LIST(*type, list);
29832983
ZEND_TYPE_FULL_MASK(*type) |= _ZEND_TYPE_UNION_BIT;
@@ -5332,7 +5332,7 @@ static zend_string *try_parse_string(const char *str, size_t len, char quote) {
53325332
return zend_string_init(str, len, 0);
53335333
}
53345334

5335-
ZEND_API zend_result zend_get_default_from_arg_info(
5335+
ZEND_API zend_result zend_get_default_from_internal_arg_info(
53365336
zval *default_value_zval, const zend_arg_info *arg_info)
53375337
{
53385338
zend_string *default_value = arg_info->default_value;

Zend/zend_API.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,10 +930,10 @@ ZEND_API bool zend_is_iterable(const zval *iterable);
930930

931931
ZEND_API bool zend_is_countable(const zval *countable);
932932

933-
void zend_convert_internal_arg_info(zend_arg_info *new_arg_info,
933+
ZEND_API void zend_convert_internal_arg_info(zend_arg_info *new_arg_info,
934934
const zend_internal_arg_info *arg_info, bool is_return_info);
935935

936-
ZEND_API zend_result zend_get_default_from_arg_info(
936+
ZEND_API zend_result zend_get_default_from_internal_arg_info(
937937
zval *default_value_zval, const zend_arg_info *arg_info);
938938

939939
END_EXTERN_C()

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4685,7 +4685,7 @@ static uint32_t zend_compile_frameless_icall_ex(znode *result, zend_ast_list *ar
46854685
} else {
46864686
zend_arg_info *arg_info = &fbc->common.arg_info[i];
46874687
arg_zvs[i].op_type = IS_CONST;
4688-
if (zend_get_default_from_arg_info(&arg_zvs[i].u.constant, arg_info) == FAILURE) {
4688+
if (zend_get_default_from_internal_arg_info(&arg_zvs[i].u.constant, arg_info) == FAILURE) {
46894689
ZEND_UNREACHABLE();
46904690
}
46914691
}

Zend/zend_execute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5657,7 +5657,7 @@ ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *cal
56575657
}
56585658

56595659
zval default_value;
5660-
if (zend_get_default_from_arg_info(&default_value, arg_info) == FAILURE) {
5660+
if (zend_get_default_from_internal_arg_info(&default_value, arg_info) == FAILURE) {
56615661
zend_execute_data *old = start_fake_frame(call, NULL);
56625662
zend_argument_error(zend_ce_argument_count_error, i + 1,
56635663
"must be passed explicitly, because the default value is not known");

ext/reflection/php_reflection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@ static zend_result get_parameter_default(zval *result, parameter_reference *para
16481648
/* We don't have a way to determine the default value for this case right now. */
16491649
return FAILURE;
16501650
}
1651-
return zend_get_default_from_arg_info(result, param->arg_info);
1651+
return zend_get_default_from_internal_arg_info(result, param->arg_info);
16521652
} else {
16531653
zval *default_value = get_default_from_recv((zend_op_array *) param->fptr, param->offset);
16541654
if (!default_value) {

0 commit comments

Comments
 (0)