mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 08:10:17 +02:00
* Restored the old behaviour of scm_create_hook.
This commit is contained in:
parent
604bc76de2
commit
f8eaf8b9a3
3 changed files with 13 additions and 9 deletions
|
@ -1,3 +1,12 @@
|
|||
2000-05-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* hooks.c (symbol_name, scm_create_hook): Restored the original
|
||||
behaviour of scm_create_hook. Changing it was bad as Carl
|
||||
R. Witty has pointed out.
|
||||
|
||||
* gc.c (scm_init_gc): We can still rely on scm_create_hook to
|
||||
protect the object.
|
||||
|
||||
2000-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* gc.c (scm_init_gc): Protect scm_after_gc_hook, since this will
|
||||
|
|
|
@ -2340,7 +2340,6 @@ void
|
|||
scm_init_gc ()
|
||||
{
|
||||
scm_after_gc_hook = scm_create_hook ("after-gc-hook", 0);
|
||||
scm_protect_object (scm_after_gc_hook);
|
||||
#include "libguile/gc.x"
|
||||
}
|
||||
|
||||
|
|
|
@ -194,20 +194,16 @@ print_hook (SCM hook, SCM port, scm_print_state *pstate)
|
|||
}
|
||||
|
||||
|
||||
SCM_SYMBOL (symbol_name, "name");
|
||||
|
||||
SCM
|
||||
scm_create_hook (const char* name, int n_args)
|
||||
{
|
||||
SCM vcell = scm_sysintern0 (name);
|
||||
SCM hook = make_hook (SCM_MAKINUM (n_args), "scm_create_hook");
|
||||
SCM_SETCDR (vcell, hook);
|
||||
|
||||
#if (SCM_DEBUG_DEPRECATED == 0)
|
||||
|
||||
scm_set_object_property_x (hook, scm_makfrom0str ("name"), scm_makfrom0str (name));
|
||||
scm_protect_object (vcell);
|
||||
|
||||
#endif /* SCM_DEBUG_DEPRECATED == 0 */
|
||||
|
||||
scm_set_object_property_x (hook, symbol_name, scm_makfrom0str (name));
|
||||
scm_protect_object (hook);
|
||||
return hook;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue