From 4b9e59b4307a9629d21898bd3615da79a7b72f37 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 4 Nov 2024 15:58:48 +0100 Subject: [PATCH 1/2] [skip ci] Use bool for zend_array_sort() zend_bool is removed in higher branches. --- Zend/zend_hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 87221eaa5e683..12a633438b3d6 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -306,7 +306,7 @@ static zend_always_inline void ZEND_FASTCALL zend_hash_sort(HashTable *ht, bucke /* Use this variant over zend_hash_sort() when sorting user arrays that may * trigger user code. It will ensure the user code cannot free the array during * sorting. */ -static zend_always_inline void zend_array_sort(HashTable *ht, bucket_compare_func_t compare_func, zend_bool renumber) { +static zend_always_inline void zend_array_sort(HashTable *ht, bucket_compare_func_t compare_func, bool renumber) { zend_array_sort_ex(ht, zend_sort, compare_func, renumber); } From 845cdbce67215a605477f92349115fef8e6186c4 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 4 Nov 2024 16:01:00 +0100 Subject: [PATCH 2/2] Postpone zend_array_sort() in ext-intl This function is not ZEND_API yet, so we cannot use it as it won't work for dynamically linked extensions. --- ext/intl/collator/collator_sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index 33e921f7b17ff..0634e68fc7a36 100644 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -292,7 +292,7 @@ static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS ) INTL_G( current_collator ) = co->ucoll; /* Sort specified array. */ - zend_array_sort(hash, collator_compare_func, renumber); + zend_hash_sort(hash, collator_compare_func, renumber); /* Restore saved collator. */ INTL_G( current_collator ) = saved_collator;