summaryrefslogtreecommitdiff
path: root/src/libdatastruct/avltreen_init.c
blob: 8d1dfa19b23a491b44420e4d87a698a51eb28870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <skalibs/genset.h>
#include <skalibs/avlnode.h>
#include <skalibs/avltreen.h>

void avltreen_init (avltreen *t, avlnode *storage, uint32_t *freelist, uint32_t size, dtok_func_ref dtok, cmp_func_ref f, void *p)
{
  GENSET_init(&t->x, avlnode, storage, freelist, size) ;
  t->root = size ;
  t->dtok = dtok ;
  t->kcmp = f ;
  t->external = p ;
}