From: Andrei Zmievski Date: Fri, 15 Oct 1999 20:37:53 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: php-4.0b3_RC2~155 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e956a266e2c49cf5c752555636e2155b7a8e2b00;p=php *** empty log message *** --- diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 54c5855b72..012aa78365 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1098,9 +1098,8 @@ ZEND_API int zend_hash_get_current_data(HashTable *ht, void **pData) } -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; diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index f5fc569f25..b0866f4455 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -62,7 +62,8 @@ typedef struct hashtable { 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() @@ -155,7 +156,7 @@ ZEND_API void zend_hash_internal_pointer_end(HashTable *ht); /* 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);