gensetdyn_deepfree.c (298B)
1 /* ISC license. */ 2 3 #include <skalibs/functypes.h> 4 #include <skalibs/gensetdyn.h> 5 6 static int freeiter (void *s, void *aux) 7 { 8 free_func_ref f = aux ; 9 (*f)(s) ; 10 return 1 ; 11 } 12 13 void gensetdyn_deepfree (gensetdyn *g, free_func_ref f) 14 { 15 gensetdyn_iter(g, &freeiter, f) ; 16 gensetdyn_free(g) ; 17 }