From d1d2e88fcebad94628f6b65b7420dec8de9b10b5 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 4 Apr 2012 22:43:20 -0700 Subject: * hash.c (hash_grow, gethash_l, gethash, gethash_f): Replace useless use of *vecref_l() with vecref(). --- ChangeLog | 5 +++++ hash.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31e3d337..ee8da268 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-04-04 Kaz Kylheku + + * hash.c (hash_grow, gethash_l, gethash, gethash_f): Replace + useless use of *vecref_l() with vecref(). + 2012-04-04 Kaz Kylheku * configure (gen_gc): Default to off. diff --git a/hash.c b/hash.c index 554935d4..384a741d 100644 --- a/hash.c +++ b/hash.c @@ -332,7 +332,7 @@ static void hash_grow(struct hash *h) bug_unless (new_modulus > h->modulus); for (i = 0; i < h->modulus; i++) { - val conses = *vecref_l(h->table, num(i)); + val conses = vecref(h->table, num(i)); while (conses) { val entry = car(conses); @@ -384,7 +384,7 @@ val *gethash_l(val hash, val key, val *new_p) val gethash(val hash, val key) { struct hash *h = (struct hash *) cobj_handle(hash, hash_s); - val chain = *vecref_l(h->table, num(h->hash_fun(key) % h->modulus)); + val chain = vecref(h->table, num(h->hash_fun(key) % h->modulus)); val found = h->assoc_fun(key, chain); return cdr(found); } @@ -392,7 +392,7 @@ val gethash(val hash, val key) val gethash_f(val hash, val key, val *found) { struct hash *h = (struct hash *) cobj_handle(hash, hash_s); - val chain = *vecref_l(h->table, num(h->hash_fun(key) % h->modulus)); + val chain = vecref(h->table, num(h->hash_fun(key) % h->modulus)); set(*found, h->assoc_fun(key, chain)); return cdr(*found); } @@ -400,7 +400,7 @@ val gethash_f(val hash, val key, val *found) val gethash_n(val hash, val key, val notfound_val) { struct hash *h = (struct hash *) cobj_handle(hash, hash_s); - val chain = *vecref_l(h->table, num(h->hash_fun(key) % h->modulus)); + val chain = vecref(h->table, num(h->hash_fun(key) % h->modulus)); val existing = h->assoc_fun(key, chain); return if3(existing, cdr(existing), notfound_val); } -- cgit v1.2.3