From efcc64a8003d79538ffe0e85f91b2d94011c20d0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 11 Feb 2014 04:30:45 -0800 Subject: * eval.c (apply): Fix regression in dwim operator: not handling nil object properly. Since dwim now trivially delegates to apply, apply must recognize nil. --- ChangeLog | 6 ++++++ eval.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ae58f4a4..44e2a244 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-02-11 Kaz Kylheku + + * 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 * combi.c (comb_hash_while_fun, comb_hash_gen_fun, comb_hash): New 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); -- cgit v1.2.3