summaryrefslogtreecommitdiff
path: root/src/libdatastruct/genset_deepfree.c
blob: 7b4a72828c308d32f35c8ba1dd2bb7533748aacb (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 (void *s, void *aux)
{
  free_func_ref f = aux ;
  (*f)(s) ;
  return 1 ;
}

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