aboutsummaryrefslogtreecommitdiff
path: root/src/ht/ft_htdestroy_all.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ht/ft_htdestroy_all.c')
-rw-r--r--src/ht/ft_htdestroy_all.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ht/ft_htdestroy_all.c b/src/ht/ft_htdestroy_all.c
new file mode 100644
index 0000000..761f577
--- /dev/null
+++ b/src/ht/ft_htdestroy_all.c
@@ -0,0 +1,26 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_htdestroy_all.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/01/30 08:29:58 by cacharle #+# #+# */
+/* Updated: 2020/01/30 08:30:53 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+static void st_htdelcontent_all(t_ftht_content *content)
+{
+ if (content == NULL)
+ return ;
+ free(content->key);
+ free(content->value);
+}
+
+void ft_htdestroy_all(t_ftht *ht)
+{
+ ft_htdestroy(ht, *st_dtdelcontent_all);
+}