From 13b84a88aa48ddaad32a602045841013230fb671 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 2 May 2019 07:04:50 -0700 Subject: bugfix: apply regression. Refactorings to apply released TXR 192 broke it, causing apply to fail to treat non-list sequences as individual arguments, as documented. This affects dotted application as well. ;; wrong (list . "abc") -> "abc" ;; correct (list . "abc") -> (#\a #\b #\c) With some misgivings, I'm not making the behavior subject to the -C compat option. * eval.c (applyv): Two things are wrong here: we moved the last fixed argument into args->list without turning it into a one-element list. Secondly, we didn't pass this list through apply_intrinsic_frob_args. We can combine both actions into just calling tolist, which is what apply_intrinsic_frob_args will do with the car of a one-element list. --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval.c b/eval.c index 1435c0d1..a3574383 100644 --- a/eval.c +++ b/eval.c @@ -1205,7 +1205,7 @@ val applyv(val fun, struct args *args) uw_throwf(error_s, lit("apply: trailing-args argument missing"), nao); if (!args->list) - args->list = z(args->arg[--args->fill]); + args->list = tolist(z(args->arg[--args->fill])); else args->list = apply_intrinsic_frob_args(args->list); -- cgit v1.2.3