mirror of
https://gitlab.com/klmp200/LO41.git
synced 2024-10-31 22:18:05 +00:00
24 lines
383 B
C
24 lines
383 B
C
//
|
|
// Created by Antoine Bartuccio on 22/05/2018.
|
|
//
|
|
#include "List.h"
|
|
|
|
GETTER(List, Element*, head)
|
|
GETTER(List, Element*, tail)
|
|
GETTER(List, int, size)
|
|
|
|
void $_free__List(THIS(List)){
|
|
free(this);
|
|
}
|
|
|
|
List *$_init_List(){
|
|
List *l = (List*) malloc_or_die(sizeof(List));
|
|
l->size = 0;
|
|
l->head = NULL;
|
|
l->tail = NULL;
|
|
|
|
LINK_ALL(List, l, get_head, get_tail, get_size)
|
|
return l;
|
|
}
|
|
|