From 42eb490febc7633ed162289921ce997ea4e35d18 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 30 Nov 2011 13:23:39 -0800 Subject: * hash.c (hash_process_weak): Fix regression caused by a mistake in the the 2010-01-26 commit, prior to release 033. When processing a table with weak values, this function was mistakenly testing the keys rather than values for for reachability. I noticed this when a test case that should run in constant memory showed unwarranted accumulation of memory. --- hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 618acc75..c2dee744 100644 --- a/hash.c +++ b/hash.c @@ -455,7 +455,7 @@ void hash_process_weak(void) for (iter = pchain; !gc_is_reachable(*iter); ) { val entry = car(*iter); - if (!gc_is_reachable(entry) && !gc_is_reachable(car(entry))) + if (!gc_is_reachable(entry) && !gc_is_reachable(cdr(entry))) *iter = cdr(*iter); else iter = cdr_l(*iter); -- cgit v1.2.3