postgresql/src/port/qsort_arg.c
Thomas Munro f374f4d664 Use sort_template.h for qsort() and qsort_arg().
Reduce duplication by using the new template.

Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CA%2BhUKGJ2-eaDqAum5bxhpMNhvuJmRDZxB_Tow0n-gse%2BHG0Yig%40mail.gmail.com
2021-03-03 17:02:32 +13:00

15 lines
325 B
C

/*
* qsort_arg.c: qsort with a passthrough "void *" argument
*/
#include "c.h"
#define ST_SORT qsort_arg
#define ST_ELEMENT_TYPE_VOID
#define ST_COMPARATOR_TYPE_NAME qsort_arg_comparator
#define ST_COMPARE_RUNTIME_POINTER
#define ST_COMPARE_ARG_TYPE void
#define ST_SCOPE
#define ST_DEFINE
#include "lib/sort_template.h"