aboutsummaryrefslogtreecommitdiff
path: root/src/ht/ft_htdelone.c
blob: b376d8b28b1b59c883ad3d17c51fe56804c267f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_htdelone.c                                      :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: cacharle <marvin@42.fr>                    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/01/30 09:27:18 by cacharle          #+#    #+#             */
/*   Updated: 2020/01/30 09:55:06 by cacharle         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "libft.h"
#include "libft_ht.h"

void	ft_htdelone(t_ftht *ht, char *key, void (*del)(t_ftht_content*))
{
	ft_lstremove_if(ht->entries + ft_hthash(ht, key),
			(t_ftbool (*)(void*, void*))ft_inter_htkey_equal, key,
			(void (*)(void*))del);
}