}
-ZEND_API int zend_hash_sort(HashTable *ht,
- void (*sort_func)(void *, size_t, size_t, compare_func_t),
- compare_func_t compar, int renumber)
+ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func,
+ compare_func_t compar, int renumber)
{
Bucket **arTmp;
Bucket *p;
unsigned char persistent;
} HashTable;
-typedef int (*compare_func_t) (const void *, const void *);
+typedef int (*compare_func_t) (const void *, const void *);
+typedef void (*sort_func_t) (void *, size_t, register size_t, compare_func_t);
BEGIN_EXTERN_C()
/* Copying, merging and sorting */
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, void (*pCopyConstructor) (void *pData), void *tmp, uint size);
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, void (*pCopyConstructor) (void *pData), void *tmp, uint size, int overwrite);
-ZEND_API int zend_hash_sort(HashTable *ht, void (*sort_func)(void *, size_t, size_t, compare_func_t), compare_func_t compar, int renumber);
+ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber);
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar) (const void *, const void *), int flag, void **pData);
ZEND_API int zend_hash_num_elements(HashTable *ht);