summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/struct.c b/struct.c
index 6d72d2ae..2fc114c1 100644
--- a/struct.c
+++ b/struct.c
@@ -1024,6 +1024,13 @@ static void static_slot_rewrite_rec(struct struct_type *st,
struct stslot *to)
{
cnum i;
+ val iter;
+
+ for (iter = st->dvtypes; iter; iter = cdr(iter)) {
+ val stype = car(iter);
+ struct struct_type *st = coerce(struct struct_type *, stype->co.handle);
+ static_slot_rewrite_rec(st, from, to);
+ }
for (i = 0; i < st->nstslots; i++) {
struct stslot *s = &st->stslot[i];
@@ -1035,16 +1042,6 @@ static void static_slot_rewrite_rec(struct struct_type *st,
*s = *to;
}
}
-
- {
- val iter;
-
- for (iter = st->dvtypes; iter; iter = cdr(iter)) {
- val stype = car(iter);
- struct struct_type *st = coerce(struct struct_type *, stype->co.handle);
- static_slot_rewrite_rec(st, from, to);
- }
- }
}