This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Creating hooks from C
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> 2. Keep scm_create_hook (name, n_args) as is, except that instead of
> adding the name *in* th hook object, it is added as an object
> property.
I'd prefer the name scm_c_define_hook or something for consistency with
snarf macros. The form could be either
hook = scm_c_define_hook (name, nargs);
or
scm_c_define_hook (&hook, name, nargs);
I'd also like if all procedures that create and define something at the
same time had the same prefix like `scm_c_define_'. For example,
`scm_make_gsubr' could be `scm_c_define_procedure'. (And I guess we'll
probably need an Emacs command guile-c-complete-symbol :)
I also have a question about hooks. Guile has two kinds of hooks:
C hooks and Scheme hooks. There are two different functions
scm_c_hook_run and scm_c_run_hook, for example. This is very
confusing. Is there any good reason to do so, or is this going to be
rewritten? (If there is a reason related to GC, I think the GC version
should be named differently...)
-- Kei