22 #define IMPLEMENT_ORDER_FUNC(funcname, elt_t) \
24 _cmp_ ## elt_t(const void *_a, const void *_b) \
26 const elt_t *a = _a, *b = _b; \
35 funcname(elt_t *array, int n_elements, int nth) \
37 tor_assert(nth >= 0); \
38 tor_assert(nth < n_elements); \
39 qsort(array, n_elements, sizeof(elt_t), _cmp_ ##elt_t); \
#define IMPLEMENT_ORDER_FUNC(funcname, elt_t)
Macros to manage assertions, fatal and non-fatal.