data_structures
src
data_structures
list
list_remove.c
Go to the documentation of this file.
1
/* ************************************************************************** */
3
/* */
4
/* ::: :::::::: */
5
/* list_remove.c :+: :+: :+: */
6
/* +:+ +:+ +:+ */
7
/* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8
/* +#+#+#+#+#+ +#+ */
9
/* Created: 2020/07/18 22:16:54 by unite #+# #+# */
10
/* Updated: 2020/09/01 19:33:39 by unite ### ########.fr */
11
/* */
12
/* ************************************************************************** */
13
14
#include "
list.h
"
15
16
void
list_remove
(
t_list
*alst,
size_t
index)
17
{
18
alst->
type
->
del
(
list_unlink
(alst, index));
19
}
list_remove
void list_remove(t_list *alst, size_t index)
Removes the item at the specified position in the list.
Definition:
list_remove.c:16
list_unlink
void * list_unlink(t_list *alst, size_t index)
Removes the item at the specified position in the list and returns it.
Definition:
list_unlink.c:41
s_list
Doubly-linked list of generic items.
Definition:
list.h:54
s_type::del
void(* del)(void *)
A function pointer used to free the memory taken by the data type.
Definition:
types.h:51
s_list::type
const t_type * type
The type of items in this list.
Definition:
list.h:59
list.h
Generated by
1.8.16