1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-15 16:20:17 +02:00

* Restored the old behaviour of scm_create_hook.

This commit is contained in:
Dirk Herrmann 2000-05-29 07:57:31 +00:00
parent 604bc76de2
commit f8eaf8b9a3
3 changed files with 13 additions and 9 deletions

View file

@ -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> 2000-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
* gc.c (scm_init_gc): Protect scm_after_gc_hook, since this will * gc.c (scm_init_gc): Protect scm_after_gc_hook, since this will

View file

@ -2340,7 +2340,6 @@ void
scm_init_gc () scm_init_gc ()
{ {
scm_after_gc_hook = scm_create_hook ("after-gc-hook", 0); scm_after_gc_hook = scm_create_hook ("after-gc-hook", 0);
scm_protect_object (scm_after_gc_hook);
#include "libguile/gc.x" #include "libguile/gc.x"
} }

View file

@ -194,20 +194,16 @@ print_hook (SCM hook, SCM port, scm_print_state *pstate)
} }
SCM_SYMBOL (symbol_name, "name");
SCM SCM
scm_create_hook (const char* name, int n_args) scm_create_hook (const char* name, int n_args)
{ {
SCM vcell = scm_sysintern0 (name); SCM vcell = scm_sysintern0 (name);
SCM hook = make_hook (SCM_MAKINUM (n_args), "scm_create_hook"); SCM hook = make_hook (SCM_MAKINUM (n_args), "scm_create_hook");
SCM_SETCDR (vcell, hook); SCM_SETCDR (vcell, hook);
scm_set_object_property_x (hook, symbol_name, scm_makfrom0str (name));
#if (SCM_DEBUG_DEPRECATED == 0) scm_protect_object (hook);
scm_set_object_property_x (hook, scm_makfrom0str ("name"), scm_makfrom0str (name));
scm_protect_object (vcell);
#endif /* SCM_DEBUG_DEPRECATED == 0 */
return hook; return hook;
} }