diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-05-15 22:59:38 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-05-15 22:59:38 -0700 |
commit | 3df89b1573d415bb18a912c4c774edc189b1ac11 (patch) | |
tree | a1ecc6d98e9aa5a420132e6cd2e546e29a1dd0e8 /regex.c | |
parent | 506cb6b8dfd3ad55bc0bef4701bbea396e9b05ac (diff) | |
download | txr-3df89b1573d415bb18a912c4c774edc189b1ac11.tar.gz txr-3df89b1573d415bb18a912c4c774edc189b1ac11.tar.bz2 txr-3df89b1573d415bb18a912c4c774edc189b1ac11.zip |
Some streamlining in the cons recycling.
* lib.c (rcyc_pop): Just assume that *plist points to a cons
and access the fields directly.
(rcyc_cons): Don't bother with rplacd.
(rcyc_list): Don't bother with set macro.
* regex.c (read_until_match): Defensive coding: locally
ensure that rcyc_pop won't be called on a nil stack,
which will now segfault.
Diffstat (limited to 'regex.c')
-rw-r--r-- | regex.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2579,7 +2579,7 @@ val read_until_match(val regex, val stream_in, val include_match_in) if (nil) { out_match: - while (stack != match) + while (stack && stack != match) unget_char(rcyc_pop(&stack), stream); if (!out) out = null_string; |