Fix from Ken Raeburn <raeburn@raeburn.org>:
authorJim Blandy <jimb@red-bean.com>
Tue, 15 Jun 1999 14:00:24 +0000 (14:00 +0000)
committerJim Blandy <jimb@red-bean.com>
Tue, 15 Jun 1999 14:00:24 +0000 (14:00 +0000)
commitab4bef85677d2f73033f61e722fb71090f02dfe6
treee69987f9eb9e425aaf20259abaa0c62ada98c87c
parent250da3691016286961cf92c0c941a292fa48d8d4
Fix from Ken Raeburn <raeburn@raeburn.org>:
* weaks.c (scm_make_weak_vector): Add another extra slot before
vector contents, to be used only during garbage collection.
* weaks.h (SCM_WVECT_GC_CHAIN): New macro to access it.
* gc.c (scm_weak_vectors): Now a SCM instead of a SCM*, and now
static.
(scm_weak_size, scm_n_weak): Deleted.
(scm_igc): Use SCM_WVECT_GC_CHAIN to build up a chain of weak
vectors without allocating new storage during GC, using
scm_weak_vectors as the head of the chain.
(scm_mark_weak_vector_spines): Walk SCM_WVECT_GC_CHAIN chain
instead of stepping through an array.
(scm_gc_sweep): Update offset used to find start of weak vector to
free it.
(scm_init_storage): Set scm_weak_vectors to EOL.
Fix from Ken Raeburn <raeburn@raeburn.org>:
* gc.c (already_in_gc): New variable.
(scm_igc): Set and clear already_in_gc; abort if it's set at
entry.
libguile/gc.c