diff --git a/gc.c b/gc.c index fb1633ab..c912d369 100644 --- a/gc.c +++ b/gc.c @@ -133,8 +133,8 @@ int sexp_valid_object_p (sexp ctx, sexp x) { #endif void sexp_mark (sexp ctx, sexp x) { - sexp_sint_t i, len; - sexp t, *p; + sexp_sint_t len; + sexp t, *p, *q; struct sexp_gc_var_t *saves; loop: if (!x || !sexp_pointerp(x) || !sexp_valid_object_p(ctx, x) || sexp_markedp(x)) @@ -144,12 +144,17 @@ void sexp_mark (sexp ctx, sexp x) { for (saves=sexp_context_saves(x); saves; saves=saves->next) if (saves->var) sexp_mark(ctx, *(saves->var)); t = sexp_object_type(ctx, x); - p = (sexp*) (((char*)x) + sexp_type_field_base(t)); len = sexp_type_num_slots_of_object(t, x) - 1; if (len >= 0) { - for (i=0; i