summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-11 04:30:45 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-11 04:30:45 -0800
commitefcc64a8003d79538ffe0e85f91b2d94011c20d0 (patch)
tree5abe8bd0608b9ca4699a0f2b5dfeac6e8a96a02e
parenta32e4c21286764c013950015108d745fbdcd97ae (diff)
downloadtxr-efcc64a8003d79538ffe0e85f91b2d94011c20d0.tar.gz
txr-efcc64a8003d79538ffe0e85f91b2d94011c20d0.tar.bz2
txr-efcc64a8003d79538ffe0e85f91b2d94011c20d0.zip
* eval.c (apply): Fix regression in dwim operator: not handling
nil object properly. Since dwim now trivially delegates to apply, apply must recognize nil.
-rw-r--r--ChangeLog6
-rw-r--r--eval.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ae58f4a4..44e2a244 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2014-02-11 Kaz Kylheku <kaz@kylheku.com>
+ * eval.c (apply): Fix regression in dwim operator: not handling
+ nil object properly. Since dwim now trivially delegates to apply,
+ apply must recognize nil.
+
+2014-02-11 Kaz Kylheku <kaz@kylheku.com>
+
* combi.c (comb_hash_while_fun, comb_hash_gen_fun, comb_hash): New
static functions.
(comb): Support hash tables.
diff --git a/eval.c b/eval.c
index 13ec8e0c..6024c60b 100644
--- a/eval.c
+++ b/eval.c
@@ -334,7 +334,7 @@ val apply(val fun, val arglist, val ctx_form)
val arg[32], *p = arg;
int variadic, fixparam, reqargs, nargs;
- if (symbolp(fun)) {
+ if (fun && symbolp(fun)) {
val binding = gethash(top_fb, fun);
if (!binding)
eval_error(ctx_form, lit("~s: no such function ~s"), car(ctx_form), fun, nao);