From 53af82552221de939d0fe7de06e49ac6e18506a2 Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Mon, 24 Feb 2003 11:26:46 +0000 Subject: [PATCH] * struct.c (scm_struct_prehistory): Move scm_free_structs to scm_before_mark_c_hook. --- libguile/ChangeLog | 2 ++ libguile/struct.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 37d8d816a..51706d323 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -5,6 +5,8 @@ (This fixes a serious GC bug, introduced during the latest reorganization of the GC, preventing freeing of structs and GOOPS objects.) + (scm_struct_prehistory): Move scm_free_structs to + scm_before_mark_c_hook. 2003-02-19 Mikael Djurfeldt diff --git a/libguile/struct.c b/libguile/struct.c index d43872e47..eb2c15cbf 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -797,7 +797,9 @@ void scm_struct_prehistory () { scm_i_structs_to_free = SCM_EOL; - scm_c_hook_add (&scm_after_sweep_c_hook, scm_free_structs, 0, 0); + /* With the new lazy sweep GC, the point at which the entire heap is + swept is just before the mark phase. */ + scm_c_hook_add (&scm_before_mark_c_hook, scm_free_structs, 0, 0); } void