This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Scheme hooks <-> C hooks
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> Guile also needs to provide them in the API because we want to be
> able to write external modules providing new types of objects with
> special GC behaviour (similar to guardians and weak vectors).
this would require somehow formalizing what info is available at each
stage of GC, how it is available, what can you do with it, etc. which
is OK, except I don't think it can ever be a stable API. oops, that
acronym again...
> > But I'm not sure whether it is true... Is there any case for an
> > application author to use C hooks?
>
> Glib provides C hooks, so I guess there are numerous examples.
>
> (Note that the current C hooks have nothing to do with the Scheme
> level. They could just as well be used in a part of an application
> not related to Guile.)
perhaps what Keisuke means is that if you can register C functions in
hooks directly, i.e. without requiring that they be exported to
Scheme, then you can have only one hook API (um...)? but I can't read
minds, usually.
--
Nobody can fix the economy. Nobody can be trusted with their finger on the
button. Nobody's perfect. VOTE FOR NOBODY.