File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 6262 *
6363 * Or use the clist_foreach() helper function, e.g.,:
6464 *
65- * static int _print_node(clist_node_t *node)
66- * {
67- * printf("0x%08x ", (unsigned)node);
68- * return 0;
69- * }
65+ * static int _print_node(clist_node_t *node, void *arg)
66+ * {
67+ * (void) arg; // unused optional argument
68+ * printf("0x%08x ", (unsigned)node);
69+ * return 0;
70+ * }
7071 *
71- * [...]
72- * clist_foreach(&list, _print_node);
72+ * [...]
73+ * clist_foreach(&list, _print_node, NULL );
7374 *
7475 * To use clist as a queue, use clist_rpush() for adding elements and clist_lpop()
7576 * for removal. Using clist_lpush() and clist_rpop() is inefficient due to
7677 * clist_rpop()'s O(n) runtime.
7778 *
78- * To use clist as stack, use clist_lpush()/ clist_lpop().
79+ * To use clist as stack, use clist_lpush() / clist_lpop().
7980 *
8081 * Implementation details:
8182 *
You can’t perform that action at this time.
0 commit comments