]> git.ozlabs.org Git - ccan/blob - ccan/order/test/compile_fail_2.c
order: Module for comparison callbacks
[ccan] / ccan / order / test / compile_fail_2.c
1 #include <stdlib.h>
2 #include <string.h>
3 #include <stdio.h>
4
5 #include <ccan/order/order.h>
6
7 #include "fancy_cmp.h"
8
9 #ifdef FAIL
10 typedef int ctx_t;
11 #else
12 typedef struct cmp_info ctx_t;
13 #endif
14
15 int main(int argc, char *argv[])
16 {
17         total_order_cb(cb0, struct item, struct cmp_info *) = fancy_cmp;
18         _total_order_cb cb1 = total_order_cast(fancy_cmp, struct item,
19                                                ctx_t *);
20
21         printf("%p %p\n", cb0, cb1);
22
23         exit(0);
24
25 }