aboutsummaryrefslogtreecommitdiff
path: root/src/ht/ft_htdelone.c
blob: 8d350aef8468673015b80645425479279e52cd16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   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(key), ft_iter_htkey_equal, key, del);
}