summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2000-05-29 07:57:31 +0000
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2000-05-29 07:57:31 +0000
commitf8eaf8b9a3b9b0ad7af0570c8f8554e19a49b7c5 (patch)
treeb1632c421585309a3a4d56710bddf33027198582
parent604bc76de2b8be6e236aca03c80bffa65dc05af3 (diff)
downloadguile-f8eaf8b9a3b9b0ad7af0570c8f8554e19a49b7c5.tar.gz
* Restored the old behaviour of scm_create_hook.
-rw-r--r--libguile/ChangeLog9
-rw-r--r--libguile/gc.c1
-rw-r--r--libguile/hooks.c12
3 files changed, 13 insertions, 9 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index d738ed86a..a78a9e875 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -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
diff --git a/libguile/gc.c b/libguile/gc.c
index 4100338dd..9c90dc31c 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -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"
}
diff --git a/libguile/hooks.c b/libguile/hooks.c
index fc46c6138..862b55a96 100644
--- a/libguile/hooks.c
+++ b/libguile/hooks.c
@@ -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;
}