[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 04/09: print_normal_symbol uses new port functions
From: |
Andy Wingo |
Subject: |
[Guile-commits] 04/09: print_normal_symbol uses new port functions |
Date: |
Wed, 1 Jun 2016 10:11:30 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit 8f615cde4574d012d5724d921588d241a5729281
Author: Andy Wingo <address@hidden>
Date: Mon May 30 11:59:58 2016 +0200
print_normal_symbol uses new port functions
* libguile/print.c (print_normal_symbol): Use new port functions.
---
libguile/print.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/libguile/print.c b/libguile/print.c
index 84c9455..4b6470e 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
- [Guile-commits] branch master updated (47918f3 -> 9454068), Andy Wingo, 2016/06/01
- [Guile-commits] 06/09: Add scm_c_put_escaped_char, scm_c_can_put_char, Andy Wingo, 2016/06/01
- [Guile-commits] 05/09: iprin1 uses scm_c_put_string, Andy Wingo, 2016/06/01
- [Guile-commits] 01/09: port_clear_stream_start_for_bom_write refactor, Andy Wingo, 2016/06/01
- [Guile-commits] 09/09: put-string in Scheme, Andy Wingo, 2016/06/01
- [Guile-commits] 02/09: Add port-line-buffered?, Andy Wingo, 2016/06/01
- [Guile-commits] 04/09: print_normal_symbol uses new port functions,
Andy Wingo <=
- [Guile-commits] 08/09: Rework text encoding to be more Scheme-friendly, Andy Wingo, 2016/06/01
- [Guile-commits] 07/09: Simplify string, symbol, char display/write impls, Andy Wingo, 2016/06/01
- [Guile-commits] 03/09: Beginnings of supporting encoding text in ports.c, Andy Wingo, 2016/06/01