diff options
author | Michael Gran <spk121@yahoo.com> | 2009-08-22 10:15:53 -0700 |
---|---|---|
committer | Michael Gran <spk121@yahoo.com> | 2009-08-23 09:29:16 -0700 |
commit | 27646f414e9350c2bf9f35982082bcabfb475c5d (patch) | |
tree | fbdf3994aad0fa19fb9791d27981efbaf8e42111 /libguile/throw.c | |
parent | 806f1ded951f92cdd3ed243daad5d97754568480 (diff) | |
download | guile-27646f414e9350c2bf9f35982082bcabfb475c5d.tar.gz |
Use string and symbol accessors in struct, throw, and array funcs
* libguile/struct.c (scm_make_struct_layout, scm_struct_init)
(scm_struct_vtable_p, scm_struct_ref, scm_struct_set_x): use string
and symbol accessors and avoid unpacking strings and symbols
* libguile/throw.c (scm_ithrow): allow wide symbols in the error message
* libguile/unif.c (scm_enclose_array, scm_istr2bve): use string
accessors and avoid unpacking strings
Diffstat (limited to 'libguile/throw.c')
-rw-r--r-- | libguile/throw.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libguile/throw.c b/libguile/throw.c index 4413efadf..cf6ea4a49 100644 --- a/libguile/throw.c +++ b/libguile/throw.c @@ -23,6 +23,7 @@ #endif #include <stdio.h> +#include <unistdio.h> #include "libguile/_scm.h" #include "libguile/async.h" #include "libguile/smob.h" @@ -744,8 +745,12 @@ scm_ithrow (SCM key, SCM args, int noreturn SCM_UNUSED) */ fprintf (stderr, "throw from within critical section.\n"); if (scm_is_symbol (key)) - fprintf (stderr, "error key: %s\n", scm_i_symbol_chars (key)); - + { + if (scm_i_is_narrow_symbol (key)) + fprintf (stderr, "error key: %s\n", scm_i_symbol_chars (key)); + else + ulc_fprintf (stderr, "error key: %llU\n", scm_i_symbol_wide_chars (key)); + } for (; scm_is_pair (s); s = scm_cdr (s), i++) { |