aboutsummaryrefslogtreecommitdiff
path: root/src/base/sort/int32.c
blob: bf209f07d2f2a0fe394ca2fa8990afc73a674c6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "internal.h"

void
sortยทint32(int32 arr[], uintptr sz)
{
    int32 tmp;
#define LESS(i, j) (arr[i] < arr[j])
#define SWAP(i, j) (tmp = arr[i], arr[i] = arr[j], arr[j] = tmp)
    QSORT(sz, LESS, SWAP);
#undef SWAP
#undef LESS
}