commit e22421e5fa7b2c64532950189154114e8ed104ce
parent 7c1bfa0f19e559ce0a205f1bff8fc1c5d59937dd
Author: Ed van Bruggen <edvb@uw.edu>
Date: Thu, 29 Mar 2018 12:46:24 -0700
define: return NULL, not value assigned
Diffstat:
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/t/prim/define.expect b/t/prim/define.expect
@@ -1,6 +1,3 @@
4
4
-4
-4
-#<primitive>
8
diff --git a/tisp.c b/tisp.c
@@ -613,7 +613,8 @@ prim_define(Hash env, Val args)
warn("define: incorrect format");
if (!(v = tisp_eval(env, car(cdr(args)))))
return NULL;
- return hash_add(env, car(args)->v.s, v);
+ hash_add(env, car(args)->v.s, v);
+ return NULL;
}
static Val