|
libft
|
Include dependency graph for ft_lstnew.c:Go to the source code of this file.
Functions | |
| t_list * | ft_lstnew (void const *content, size_t content_size) |
| Allocates a new list. More... | |
| t_list* ft_lstnew | ( | void const * | content, |
| size_t | content_size | ||
| ) |
Allocates a new list.
Allocates (with malloc) and returns a “fresh” link. The variables content and content_size of the new link are initialized by copy of the parameters of the function. If the parameter content is NULL, the variable content is initialized to NULL and the variable content_size is initialized to 0 even if the parameter content_size isn’t. The variable next is initialized to NULL.
| content | The content to put in the new link. |
| content_size | The size of the content of the new link. |
NULL if allocation fails. Definition at line 31 of file ft_lstnew.c.
1.8.16