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.inc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linked_list.inc.h') diff --git a/linked_list.inc.h b/linked_list.inc.h index be51e582..7d9452e0 100644 --- a/linked_list.inc.h +++ b/linked_list.inc.h @@ -52,7 +52,7 @@ INIT_F ( LINK(TYPE), TYPE* val ) { return 0; } -int LLIST_CONS(TYPE) ( LLIST(TYPE)* lst, TYPE* val) { +int PUSH(LLIST(TYPE)) ( LLIST(TYPE)* lst, TYPE* val) { NEW(LINK(TYPE), link, val); link->after = lst->head->after; @@ -73,7 +73,7 @@ int DEEP_COPY(LLIST(TYPE)) ( LLIST(TYPE)* dest, LLIST(TYPE)* src ) { while (n->after != NULL) { NEW(TYPE, cpy); DEEP_COPY(TYPE)(cpy, n->value); - LLIST_CONS(TYPE) ( dest, cpy ); + PUSH(LLIST(TYPE)) ( dest, cpy ); n = n->after; } -- cgit v1.2.3