summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-11-16 20:14:44 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-11-20 16:17:18 -0800
commit8b0f773dad83e5d7bb07ae391352b6ffb7aa5937 (patch)
tree29641e3c9690fae6ca7aa665a0c5105aca2634a5 /lib.c
parentd89b907d2dc260bee706f787e05f55344b61785e (diff)
downloadtxr-8b0f773dad83e5d7bb07ae391352b6ffb7aa5937.tar.gz
txr-8b0f773dad83e5d7bb07ae391352b6ffb7aa5937.tar.bz2
txr-8b0f773dad83e5d7bb07ae391352b6ffb7aa5937.zip
Combat spurious retention in mapdo.
* lib.c (mapdo): gc_hint the list variable so that the list march isn't entirely optimized into a register, leaving a pointer to the top of the list on the stack.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 580b2c2c..4700344e 100644
--- a/lib.c
+++ b/lib.c
@@ -6377,6 +6377,8 @@ val mapdo(val fun, val list)
{
list = nullify(list);
+ gc_hint(list);
+
for (; list; list = cdr(list))
funcall1(fun, car(list));