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

#include <skalibs/functypes.h>
#include <skalibs/genset.h>

static int freeiter (char *s, void *aux)
{
  freefunc_t_ref f = aux ;
  (*f)((void *)s) ;
  return 1 ;
}

void genset_deepfree (genset *g, freefunc_t_ref f)
{
  genset_iter(g, &freeiter, f) ;
}