aboutsummaryrefslogtreecommitdiffstats
path: root/libnormalform_clause_sort_cmp__.c
blob: de9f7540e94b1969b54e2a03a63ba2f5bae7da12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST


int
(libnormalform_clause_sort_cmp__)(const void *a, const void *b)
{
	struct expression *const *ap = a, *const *bp = b;
	return libnormalform_clause_cmp__(*ap, *bp);
}


#else


#if defined(__GNUC__) /* TODO remove when testing is implemented in libnormalform_clause_sort_cmp__.c */
# pragma GCC diagnostic ignored "-Wunused-function"
# pragma GCC diagnostic ignored "-Wunused-macros"
#endif

#define libnormalform_clause_cmp__(...) cmptrampoline(__VA_ARGS__)

PURE static int
cmptrampoline(struct expression *a, struct expression *b)
{
	return libnormalform_clause_sort_cmp__(&a, &b);
}

#include "libnormalform_clause_cmp__.c"


#endif