Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The taming of the before-gc-hook (was Re: Upcoming 1.3.2 release)
Mikael Djurfeldt <firstname.lastname@example.org> writes:
> Using a special registration function and mechanism for the
> before-gc-hook is certainly one possibility, and, maybe it is the most
> easily maintainable in the long run.
> I'd like to propose two additional alternatives:
> 1. The C programmer sees two hooks
> to which he can attach his C functions (wrapped as a subr).
> The Scheme programmer sees only after-gc-hook (which is in fact
> the hook stored in scm_after_gc_hook).
> This is as safe the special registration function alternative, but the
> user interface is more symmetric and less code is required to
> implement it.
Why is a C function on scm_before_gc_hook any safer than a Scheme
function? The C function can just as easily call guile functions
which require space to be grabbed.
Harvey J. Stein
Guile Home |
Main Index |