]>
Commit | Line | Data |
---|---|---|
1 | #include <stdlib.h> | |
2 | #include <Block_private.h> | |
3 | ||
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 | ||
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 | { | |
14 | void *cmp_f = ((struct Block_layout *)cmp_b)->invoke; | |
15 | qsort_r(base, nel, width, cmp_b, (void*)cmp_f); | |
16 | } | |
17 | #pragma clang diagnostic pop |