]> git.ozlabs.org Git - ccan/blob - ccan/aga/test/compile_ok.c
tal: handle take() pointers more carefully.
[ccan] / ccan / aga / test / compile_ok.c
1 #include "config.h"
2
3 #include <ccan/aga/aga.h>
4 #include <ccan/aga/aga.c>
5
6 typedef struct edge edge_t;
7
8 #ifndef EDGE1
9 #define EDGE1 edge_t
10 #endif
11
12 #ifndef EDGE2
13 #define EDGE2 edge_t
14 #endif
15
16 #ifndef EDGE3
17 #define EDGE3 edge_t
18 #endif
19
20 #ifndef EDGE4
21 #define EDGE4 edge_t
22 #endif
23
24 int main(void)
25 {
26         struct aga_graph g;
27         EDGE1 *(*first_edge)(const struct aga_graph *g,
28                              const struct aga_node *n) = NULL;
29         EDGE2 *(*next_edge)(const struct aga_graph *g,
30                             const struct aga_node *n,
31                             EDGE3 *e) = NULL;
32         int (*edge_info)(const struct aga_graph *g, const struct aga_node *n,
33                          EDGE4 *e, struct aga_edge_info *ei) = NULL;
34
35         aga_init_graph(&g, first_edge, next_edge, edge_info);
36
37         return 0;
38 }
39