commit 0b2df2b16f9befd08c1f90d48797038d6ee93bf0
parent 54a886a217f53e4ddb7dba47c46b1747fcb3eb75
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Sat, 31 Mar 2018 13:56:26 -0700
Have tib_math_env modify env instead of returning
Diffstat:
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/main.c b/main.c
@@ -74,7 +74,7 @@ main(int argc, char *argv[])
 	FILE *fp;
 	Val v;
 	Hash env = tisp_init_env(64);
-	env = tib_math_env(env);
+	tib_math_env(env);
 
 	nil.t = NIL;
 	t.t = SYMBOL;
diff --git a/tib/math.c b/tib/math.c
@@ -4,7 +4,7 @@
 #include "../tisp.h"
 #include "math.h"
 
-Val
+static Val
 prim_add(Hash env, Val args)
 {
 	Val v;
@@ -19,9 +19,8 @@ prim_add(Hash env, Val args)
 	return mk_int(i);
 }
 
-Hash
+void
 tib_math_env(Hash ht)
 {
 	hash_add(ht, "+", mk_prim(prim_add));
-	return ht;
 }
diff --git a/tib/math.h b/tib/math.h
@@ -1,3 +1,3 @@
 /* See LICENSE file for copyright and license details. */
 
-Hash tib_math_env(Hash ht);
+void tib_math_env(Hash ht);