summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-06-20 07:15:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-06-20 07:15:34 -0700
commit61a72064b0269ff3443fff3bfbe098de458605ca (patch)
treec1153ddc4ff04b35031aedf5ff5358a2511062da /match.c
parente21a452a9c75074ab7eff33b70950aecf3f3c309 (diff)
downloadtxr-61a72064b0269ff3443fff3bfbe098de458605ca.tar.gz
txr-61a72064b0269ff3443fff3bfbe098de458605ca.tar.bz2
txr-61a72064b0269ff3443fff3bfbe098de458605ca.zip
Optimization: add missing tail updates to some list
collecting loops. * lib.c (tuples_func, where, sel): Catch return value of list_collect and update tail variable. * match.c (do_txeval): Likewise. * parser.y (expand_meta): Likewise for list_collect_nconc.
Diffstat (limited to 'match.c')
-rw-r--r--match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/match.c b/match.c
index e393e9b3..7a3e06c7 100644
--- a/match.c
+++ b/match.c
@@ -1464,7 +1464,7 @@ static val do_txeval(val spec, val form, val bindings, val allow_unbound)
list_collect_decl (out, tail);
uw_set_match_context(cons(spec, bindings));
for (iter = rest(form); iter != nil; iter = cdr(iter))
- list_collect(tail, subst_vars(cdr(car(iter)), bindings, nil));
+ tail = list_collect(tail, subst_vars(cdr(car(iter)), bindings, nil));
ret = out;
uw_env_end;
} else if (regexp(sym)) {