]> git.saurik.com Git - apple/libc.git/blame - stdlib/qsort_b.c
Libc-1353.100.2.tar.gz
[apple/libc.git] / stdlib / qsort_b.c
CommitLineData
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
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{
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