diff options
Diffstat (limited to 'misc/examples/intrusive.c')
| -rw-r--r-- | misc/examples/intrusive.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/misc/examples/intrusive.c b/misc/examples/intrusive.c index 0f153589..80c1f63b 100644 --- a/misc/examples/intrusive.c +++ b/misc/examples/intrusive.c @@ -3,8 +3,9 @@ #include <stdio.h> #define i_type List -#define i_val int -#include <stc/clist.h> +#define i_key int +#define i_native_cmp +#include <stc/clist.h> void printList(List list) { printf("list:"); @@ -13,7 +14,7 @@ void printList(List list) { puts(""); } -int main() { +int main(void) { List list = {0}; c_forlist (i, int, {6, 9, 3, 1, 7, 4, 5, 2, 8}) List_push_back_node(&list, c_new(List_node, {.value=*i.ref})); |
