This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: Weak observers (was Re: The taming of the before-gc-hook)
Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> writes:
> With this solution, the TOKENs returned by scm_env_observe and
> scm_env_weak_observe would be the functions themselves.
Sigh... How extremely stupid.
Obviously, the TOKENs can't be the procedures, because they would be
protected by the holder of the TOKEN. :(
ls = environment->weak_observers;
while (SCM_NIMP (ls))
{
SCM next = SCM_CDR (ls);
if (SCM_FREEP (SCM_OBSERVER (SCM_CAR (ls)->scheme)))
SCM_SETCDR (ls, next);
ls = next;
}