Skip to content

Commit d7e34cf

Browse files
author
Sascha Schumann
committed
Get rid of second declaration of compare_func_t. Either put in a common
header file or prefix it with i.e. zend_llist_
1 parent f1dac01 commit d7e34cf

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Zend/zend_llist.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func)
171171
*ptr++ = element;
172172
}
173173

174-
qsort(elements, list_size, sizeof(zend_llist_element *), (compare_func_t) comp_func);
174+
qsort(elements, list_size, sizeof(zend_llist_element *), (int (*)(const void *, const void *)) comp_func);
175175

176176
l->head = elements[0];
177177
elements[0]->prev = NULL;

Zend/zend_llist.h

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ typedef struct _zend_llist {
3939
} zend_llist;
4040

4141
typedef int (*llist_compare_func_t) (const zend_llist_element *, const zend_llist_element *);
42-
typedef int (*compare_func_t)(const void *, const void *);
4342

4443
BEGIN_EXTERN_C()
4544
ZEND_API void zend_llist_init(zend_llist *l, size_t size, void (*dtor)(void *data), unsigned char persistent);

0 commit comments

Comments
 (0)