From 15933c5dc8298e19de7e2916fac5368c96c765c3 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 27 Jul 2021 22:17:03 -0700 Subject: struct: get rid of pointer typedef. * lib.h (slot_cache_t): Typedef removed. (struct sym): Use slot_cache_set_t *. * struct.c (struct_type_finalize, lookup_slot, lookup_static_slot, lookup_static_slot_desc): Likewise. --- struct.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 1efc64f1..ef67a037 100644 --- a/struct.c +++ b/struct.c @@ -243,7 +243,7 @@ static val struct_type_finalize(val obj) for (iter = st->slots; iter; iter = cdr(iter)) { val slot = car(iter); - slot_cache_t slot_cache = slot->s.slot_cache; + slot_cache_set_t *slot_cache = slot->s.slot_cache; int i, j; remhash(slot_hash, cons(slot, id)); @@ -1097,7 +1097,7 @@ static void cache_set_insert(slot_cache_entry_t *set, cnum id, cnum slot) static loc lookup_slot(val inst, struct struct_inst *si, val sym) { - slot_cache_t slot_cache = sym->s.slot_cache; + slot_cache_set_t *slot_cache = sym->s.slot_cache; cnum id = si->id; if (slot_cache != 0) { @@ -1130,7 +1130,7 @@ static loc lookup_slot(val inst, struct struct_inst *si, val sym) } } } else { - slot_cache = coerce(slot_cache_t, + slot_cache = coerce(slot_cache_set_t *, chk_calloc(SLOT_CACHE_SIZE, sizeof (slot_cache_set_t))); slot_cache_set_t *set = &slot_cache[id % SLOT_CACHE_SIZE]; @@ -1159,7 +1159,7 @@ static loc lookup_slot(val inst, struct struct_inst *si, val sym) static struct stslot *lookup_static_slot_desc(struct struct_type *st, val sym) { - slot_cache_t slot_cache = sym->s.slot_cache; + slot_cache_set_t *slot_cache = sym->s.slot_cache; cnum id = st->id; if (slot_cache != 0) { @@ -1182,7 +1182,7 @@ static struct stslot *lookup_static_slot_desc(struct struct_type *st, val sym) } } } else { - slot_cache = coerce(slot_cache_t, + slot_cache = coerce(slot_cache_set_t *, chk_calloc(SLOT_CACHE_SIZE, sizeof (slot_cache_set_t))); slot_cache_set_t *set = &slot_cache[id % SLOT_CACHE_SIZE]; -- cgit v1.2.3