aboutsummaryrefslogtreecommitdiff
path: root/linked_list.inc.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-05 15:38:03 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-05 18:16:19 +0100
commit447e42b4fbf5567b3cf96ddee0186f76f0c7ebe9 (patch)
tree349566b092f4d6f566cad3411f4e926534c5b304 /linked_list.inc.h
parentAdd single file mode. (diff)
downloadcalp-447e42b4fbf5567b3cf96ddee0186f76f0c7ebe9.tar.gz
calp-447e42b4fbf5567b3cf96ddee0186f76f0c7ebe9.tar.xz
Improve templating macros.
Diffstat (limited to 'linked_list.inc.h')
-rw-r--r--linked_list.inc.h4
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;
}