diff options
author | Andy Wingo <wingo@pobox.com> | 2016-05-30 11:59:58 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-05-30 15:07:20 +0200 |
commit | 8f615cde4574d012d5724d921588d241a5729281 (patch) | |
tree | d826f30c2befb9777b51d9e01ede073c4c57b5ed | |
parent | 43b6feeb1adafe54170304e7cc3c29a15c1d3808 (diff) | |
download | guile-8f615cde4574d012d5724d921588d241a5729281.tar.gz |
print_normal_symbol uses new port functions
* libguile/print.c (print_normal_symbol): Use new port functions.
-rw-r--r-- | libguile/print.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libguile/print.c b/libguile/print.c index 84c9455b3..4b6470e1c 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -436,16 +436,18 @@ symbol_has_extended_read_syntax (SCM sym) static void print_normal_symbol (SCM sym, SCM port) { - size_t len; - scm_t_string_failed_conversion_handler strategy; - - len = scm_i_symbol_length (sym); - strategy = PORT_CONVERSION_HANDLER (port); + size_t len = scm_i_symbol_length (sym); if (scm_i_is_narrow_symbol (sym)) - display_string (scm_i_symbol_chars (sym), 1, len, port, strategy); + { + const char *ptr = scm_i_symbol_chars (sym); + scm_c_put_latin1_chars (port, (const scm_t_uint8 *) ptr, len); + } else - display_string (scm_i_symbol_wide_chars (sym), 0, len, port, strategy); + { + const scm_t_wchar *ptr = scm_i_symbol_wide_chars (sym); + scm_c_put_utf32_chars (port, (const scm_t_uint32 *) ptr, len); + } } static void |