summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-02-27 17:58:37 -0800
committerKaz Kylheku <kaz@kylheku.com>2023-02-27 17:58:37 -0800
commit3ade8d5cc4514df520edd4f95817b445e35fff41 (patch)
tree5d25ab5d84b84f1b88de7a176c7928f31851a119
parentf240f80051a409043ee7717b5f995f75832a8f78 (diff)
downloadtxr-3ade8d5cc4514df520edd4f95817b445e35fff41.tar.gz
txr-3ade8d5cc4514df520edd4f95817b445e35fff41.tar.bz2
txr-3ade8d5cc4514df520edd4f95817b445e35fff41.zip
txr: bugfix, allow lazy lists in multi match.
* match.c (do_match_line): Handle LCONS the same way as CONS. When a variable occurs whose value is a list of strings, that may be a lazy list. I ran into a problem using @(data x) to capture a list of strings, and then matching that with @x; the error being "unsupported object in spec", caused by the list's LCONS type not handled in this switch.
-rw-r--r--match.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/match.c b/match.c
index 14a0bb3f..29f634cf 100644
--- a/match.c
+++ b/match.c
@@ -1752,6 +1752,7 @@ static val do_match_line(match_line_ctx *c)
switch (type(elem)) {
case CONS: /* directive */
+ case LCONS:
{
val directive = first(elem);