1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

* feature.c, feature.h (scm_c_run_hook): Added.

This commit is contained in:
Mikael Djurfeldt 1999-08-05 12:08:01 +00:00
parent 1777c18bc1
commit ef1ae5630a
2 changed files with 8 additions and 1 deletions

View file

@ -194,10 +194,16 @@ scm_run_hook (SCM hook, SCM args)
scm_misc_error (s_add_hook_x,
"This hook requires %s arguments",
SCM_LIST1 (SCM_CADR (hook)));
scm_c_run_hook (hook, args);
return SCM_UNSPECIFIED;
}
void
scm_c_run_hook (SCM hook, SCM args)
{
hook = SCM_CDR (hook);
while (SCM_NIMP (hook = SCM_CDR (hook)))
scm_apply (SCM_CAR (hook), args, SCM_EOL);
return SCM_UNSPECIFIED;
}

View file

@ -55,6 +55,7 @@ extern SCM scm_add_hook_x (SCM hook, SCM thunk, SCM appendp);
extern SCM scm_remove_hook_x (SCM hook, SCM thunk);
extern SCM scm_reset_hook_x (SCM hook);
extern SCM scm_run_hook (SCM hook, SCM args);
extern void scm_c_run_hook (SCM hook, SCM args);
extern void scm_init_feature (void);
#endif /* FEATUREH */