10 #define RZ_SKIP_LIST_H
44 #define rz_skiplist_islast(list, el) (el->forward[0] == list->head)
46 #define rz_skiplist_length(list) (list->size)
48 #define rz_skiplist_foreach(list, it, pos) \
50 for (it = list->head->forward[0]; it != list->head && ((pos = it->data) || 1); it = it->forward[0])
52 #define rz_skiplist_foreach_safe(list, it, tmp, pos) \
54 for (it = list->head->forward[0]; it != list->head && ((pos = it->data) || 1) && ((tmp = it->forward[0]) || 1); it = tmp)
static void freefn(HtName_(Ht) *ht, HT_(Kv) *kv)
static void list(RzEgg *egg)
void(* RzListFree)(void *ptr)
int(* RzListComparator)(const void *value, const void *list_data)
RZ_API void * rz_skiplist_get_n(RzSkipList *list, int n)
RZ_API bool rz_skiplist_delete_node(RzSkipList *list, RzSkipListNode *node)
RZ_API void * rz_skiplist_get_geq(RzSkipList *list, void *data)
RZ_API RzSkipListNode * rz_skiplist_find(RzSkipList *list, void *data)
RZ_API bool rz_skiplist_delete(RzSkipList *list, void *data)
RZ_API void * rz_skiplist_get_first(RzSkipList *list)
RZ_API void rz_skiplist_purge(RzSkipList *list)
RZ_API void * rz_skiplist_get_leq(RzSkipList *list, void *data)
RZ_API RzList * rz_skiplist_to_list(RzSkipList *list)
RZ_API RzSkipList * rz_skiplist_new(RzListFree freefn, RzListComparator comparefn)
RZ_API void rz_skiplist_join(RzSkipList *l1, RzSkipList *l2)
RZ_API RzSkipListNode * rz_skiplist_find_geq(RzSkipList *list, void *data)
RZ_API RzSkipListNode * rz_skiplist_find_leq(RzSkipList *list, void *data)
struct rz_skiplist_node_t RzSkipListNode
RZ_API bool rz_skiplist_empty(RzSkipList *list)
RZ_API void rz_skiplist_free(RzSkipList *list)
RZ_API RzSkipListNode * rz_skiplist_insert(RzSkipList *list, void *data)
struct rz_skiplist_t RzSkipList
struct rz_skiplist_node_t ** forward