* struct.c (scm_struct_gc_init): Removed.

(scm_struct_prehistory): Init scm_i_structs_to_free to SCM_EOL.
(This fixes a serious GC bug, introduced during the latest
reorganization of the GC, preventing freeing of structs and GOOPS
objects.)
This commit is contained in:
Mikael Djurfeldt 2003-02-24 10:46:29 +00:00
commit ea5c928530
2 changed files with 10 additions and 10 deletions

View file

@ -1,3 +1,11 @@
2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* struct.c (scm_struct_gc_init): Removed.
(scm_struct_prehistory): Init scm_i_structs_to_free to SCM_EOL.
(This fixes a serious GC bug, introduced during the latest
reorganization of the GC, preventing freeing of structs and GOOPS
objects.)
2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31

View file

@ -355,15 +355,6 @@ scm_struct_free_entity (scm_t_bits * vtable SCM_UNUSED, scm_t_bits * data)
scm_gc_free ((void *) data[scm_struct_i_ptr], n, "entity struct");
}
static void *
scm_struct_gc_init (void *dummy1 SCM_UNUSED,
void *dummy2 SCM_UNUSED,
void *dummy3 SCM_UNUSED)
{
scm_i_structs_to_free = SCM_EOL;
return 0;
}
static void *
scm_free_structs (void *dummy1 SCM_UNUSED,
void *dummy2 SCM_UNUSED,
@ -408,6 +399,7 @@ scm_free_structs (void *dummy1 SCM_UNUSED,
}
}
while (!SCM_NULLP (newchain));
scm_i_structs_to_free = SCM_EOL;
return 0;
}
@ -804,7 +796,7 @@ scm_print_struct (SCM exp, SCM port, scm_print_state *pstate)
void
scm_struct_prehistory ()
{
scm_c_hook_add (&scm_before_mark_c_hook, scm_struct_gc_init, 0, 0);
scm_i_structs_to_free = SCM_EOL;
scm_c_hook_add (&scm_after_sweep_c_hook, scm_free_structs, 0, 0);
}