* Restored the old behaviour of scm_create_hook.
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Mon, 29 May 2000 07:57:31 +0000 (07:57 +0000)
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Mon, 29 May 2000 07:57:31 +0000 (07:57 +0000)
libguile/ChangeLog
libguile/gc.c
libguile/hooks.c

index d738ed8..a78a9e8 100644 (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>
 
        * gc.c (scm_init_gc):  Protect scm_after_gc_hook, since this will
index 4100338..9c90dc3 100644 (file)
@@ -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"
 }
 
index fc46c61..862b55a 100644 (file)
@@ -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;
 }