summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-07-27 22:17:03 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-07-27 22:17:03 -0700
commit15933c5dc8298e19de7e2916fac5368c96c765c3 (patch)
treed4c65c4bfacdfd8e2a5437eb24c6fb4775b8c41a /struct.c
parentafdcf81a2c4556b4a6107afd9869616267c9bdeb (diff)
downloadtxr-15933c5dc8298e19de7e2916fac5368c96c765c3.tar.gz
txr-15933c5dc8298e19de7e2916fac5368c96c765c3.tar.bz2
txr-15933c5dc8298e19de7e2916fac5368c96c765c3.zip
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.
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c10
1 files changed, 5 insertions, 5 deletions
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];