]> git.saurik.com Git - apple/libc.git/blame_incremental - stdlib/qsort_b.c
Libc-1272.250.1.tar.gz
[apple/libc.git] / stdlib / qsort_b.c
... / ...
CommitLineData
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
9typedef int cmp_t(const void *, const void *);
10
11void
12qsort_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