X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Favl%2Favl.h;h=304de7c2b12266e56194034f6c4e6cd88b3e1938;hp=4cbe08b1a285e0bce6deb4546178597b322e9096;hb=HEAD;hpb=b23be29f01f22bba07b8cb8bcb41dab92180f219 diff --git a/ccan/avl/avl.h b/ccan/avl/avl.h index 4cbe08b1..304de7c2 100644 --- a/ccan/avl/avl.h +++ b/ccan/avl/avl.h @@ -26,13 +26,13 @@ #include #include +#include + typedef struct AVL AVL; typedef struct AvlNode AvlNode; typedef struct AvlIter AvlIter; -typedef int (*AvlCompare)(const void *, const void *); - -AVL *avl_new(AvlCompare compare); +AVL *avl_new(total_order_noctx_cb compare); /* Create a new AVL tree sorted with the given comparison function. */ void avl_free(AVL *avl); @@ -106,7 +106,7 @@ void avl_iter_next(AvlIter *iter); /***************** Internal data structures ******************/ struct AVL { - AvlCompare compare; + total_order_noctx_cb compare; AvlNode *root; size_t count; };