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

#include <skalibs/stralloc.h>
#include <skalibs/genalloc.h>
#include <skalibs/gensetdyn.h>

void gensetdyn_init (gensetdyn_ref g, unsigned int esize, unsigned int base, unsigned int fracnum, unsigned int fracden)
{
  g->storage = stralloc_zero ;
  g->freelist = genalloc_zero ;
  g->esize = esize ;
  g->base = base ;
  g->fracnum = fracnum ;
  g->fracden = fracden ;
}