pre-boot lookup of print-exception works
authorAndy Wingo <wingo@pobox.com>
Fri, 11 Feb 2011 14:21:58 +0000 (15:21 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 11 Feb 2011 14:21:58 +0000 (15:21 +0100)
* libguile/backtrace.c (scm_print_exception): Use scm_module_variable to
  look up print-exception so that it works before boot-9 is loaded.

* libguile/throw.c (CACHE_VAR): Tweak to use scm_from_latin1_symbol.

libguile/backtrace.c
libguile/throw.c

index 8edc4e8..c7abe31 100644 (file)
@@ -80,8 +80,9 @@ scm_print_exception (SCM port, SCM frame, SCM key, SCM args)
   SCM_VALIDATE_LIST (4, args);
   
   if (scm_is_false (print_exception))
-    print_exception = scm_c_module_lookup (scm_the_root_module (),
-                                           "print-exception");
+    print_exception =
+      scm_module_variable (scm_the_root_module (),
+                           scm_from_latin1_symbol ("print-exception"));
 
   return scm_call_4 (scm_variable_ref (print_exception),
                      port, frame, key, args);
index 7b2a98b..94783e0 100644 (file)
@@ -58,7 +58,7 @@
   if (scm_is_false (var))                                               \
     {                                                                   \
       var = scm_module_variable (scm_the_root_module (),                \
-                                 scm_from_locale_symbol (name));        \
+                                 scm_from_latin1_symbol (name));        \
       if (scm_is_false (var))                                           \
         abort ();                                                       \
     }