]>
Commit | Line | Data |
---|---|---|
b061a43b A |
1 | #include <stdlib.h> |
2 | #include <Block_private.h> | |
3 | ||
70ad1dc8 A |
4 | #pragma clang diagnostic push |
5 | #pragma clang diagnostic ignored "-Wimplicit-function-declaration" | |
6 | #pragma clang diagnostic ignored "-Wstrict-prototypes" | |
7 | #pragma clang diagnostic ignored "-Wint-conversion" | |
8 | ||
b061a43b A |
9 | typedef int cmp_t(const void *, const void *); |
10 | ||
11 | void | |
12 | qsort_b(void *base, size_t nel, size_t width, cmp_t ^cmp_b) | |
13 | { | |
70ad1dc8 | 14 | void *cmp_f = ((struct Block_layout *)cmp_b)->invoke; |
b061a43b A |
15 | qsort_r(base, nel, width, cmp_b, (void*)cmp_f); |
16 | } | |
70ad1dc8 | 17 | #pragma clang diagnostic pop |