diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-05 15:38:03 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-05 18:16:19 +0100 |
commit | 447e42b4fbf5567b3cf96ddee0186f76f0c7ebe9 (patch) | |
tree | 349566b092f4d6f566cad3411f4e926534c5b304 /linked_list.inc.h | |
parent | Add single file mode. (diff) | |
download | calp-447e42b4fbf5567b3cf96ddee0186f76f0c7ebe9.tar.gz calp-447e42b4fbf5567b3cf96ddee0186f76f0c7ebe9.tar.xz |
Improve templating macros.
Diffstat (limited to 'linked_list.inc.h')
-rw-r--r-- | linked_list.inc.h | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |