From 447e42b4fbf5567b3cf96ddee0186f76f0c7ebe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 5 Feb 2019 15:38:03 +0100 Subject: Improve templating macros. --- linked_list.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'linked_list.h') diff --git a/linked_list.h b/linked_list.h index 90a110bf..5bf3db15 100644 --- a/linked_list.h +++ b/linked_list.h @@ -3,10 +3,8 @@ #include "macro.h" -#define LLIST(T) TP(llist__, T) -#define LINK(T) TP(llist_link__, T) - -#define LLIST_CONS(T) TP(llist_cons__, T) +#define LLIST(T) TEMPL(llist, T) +#define LINK(T) TEMPL(llist_link, T) #endif /* LINKED_LIST_H */ #ifdef TYPE @@ -31,7 +29,7 @@ INIT_F ( LINK(TYPE) ); INIT_F ( LINK(TYPE), TYPE* val ); FREE_F ( LINK(TYPE) ); -int LLIST_CONS(TYPE) ( LLIST(TYPE)* lst, TYPE* val); +int PUSH(LLIST(TYPE)) ( LLIST(TYPE)* lst, TYPE* val); int DEEP_COPY(LLIST(TYPE)) ( LLIST(TYPE)* dest, LLIST(TYPE)* src ); -- cgit v1.2.3