1 #include <ccan/tlist/tlist.h>
3 TLIST_TYPE(children
, struct child
);
7 struct ccan_list_node list
;
12 struct ccan_list_node list
;
15 int main(int argc
, char *argv
[])
17 struct tlist_children children
;
18 struct child child
= { "child" };
20 #if !HAVE_FLEXIBLE_ARRAY_MEMBER
21 #error Need flexible array members to check type
28 tlist_init(&children
);
29 tlist_add(&children
, &child
, list
);
31 tlist_for_each_safe(&children
, c
, n
, list
);