diff th_config.h @ 708:a34715d51ea4

Add support for deallocator function in th_cfg_free() for freeing the values.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 27 Apr 2020 00:44:15 +0300
parents 1092eb33bd59
children 4ca6a3b30fe8
line wrap: on
line diff
--- a/th_config.h	Mon Apr 27 00:43:20 2020 +0300
+++ b/th_config.h	Mon Apr 27 00:44:15 2020 +0300
@@ -63,7 +63,7 @@
 // Functions
 //
 int     th_cfg_read(th_ioctx *fh, th_cfgitem_t *cfg /*, TODO XXX const int flags (for controlling things like "error out on unknown items or ignore" etc */);
-void    th_cfg_free(th_cfgitem_t *cfg);
+void    th_cfg_free(th_cfgitem_t *cfg, void (*freefunc)(th_cfgitem_t *));
 int     th_cfg_write(th_ioctx *fh, const th_cfgitem_t *cfg);
 
 int     th_cfg_add_comment(th_cfgitem_t **cfg, const char *comment);