Commit 853cec45 authored by simonmar's avatar simonmar
Browse files

[project @ 2000-06-20 15:18:40 by simonmar]

Don't try to finalize DEAD_WEAKs.  This fix has been sitting in my
tree for so long, I can't remember whether it was a real bugfix or
just a cleanup, oh well.
parent 5a04162d
/* -----------------------------------------------------------------------------
* $Id: Weak.c,v 1.14 2000/05/22 13:09:29 simonmar Exp $
* $Id: Weak.c,v 1.15 2000/06/20 15:18:40 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -34,10 +34,12 @@ finalizeWeakPointersNow(void)
while ((w = weak_ptr_list)) {
weak_ptr_list = w->link;
IF_DEBUG(weak,fprintf(stderr,"Finalising weak pointer at %p -> %p\n", w, w->key));
w->header.info = &DEAD_WEAK_info;
if (w->finalizer != &NO_FINALIZER_closure) {
rts_evalIO(w->finalizer,NULL);
if (w->header.info != &DEAD_WEAK_info) {
w->header.info = &DEAD_WEAK_info;
IF_DEBUG(weak,fprintf(stderr,"Finalising weak pointer at %p -> %p\n", w, w->key));
if (w->finalizer != &NO_FINALIZER_closure) {
rts_evalIO(w->finalizer,NULL);
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment