summaryrefslogtreecommitdiff
path: root/libguile/print.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-05-30 15:05:40 +0200
committerAndy Wingo <wingo@pobox.com>2016-05-30 15:07:23 +0200
commit934b6dc398ad1875768e503c9e779d5c1f1db774 (patch)
treefaf298ddff78d631db4fea36f4e8dba2c62ded6f /libguile/print.c
parent8f615cde4574d012d5724d921588d241a5729281 (diff)
downloadguile-934b6dc398ad1875768e503c9e779d5c1f1db774.tar.gz
iprin1 uses scm_c_put_string
* libguile/print.c (iprin1): Use scm_c_put_string for strings. * test-suite/test-suite/lib.scm (exception:encoding-error): Add an additional expected error string for `encoding-error'.
Diffstat (limited to 'libguile/print.c')
-rw-r--r--libguile/print.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libguile/print.c b/libguile/print.c
index 4b6470e1c..519393c95 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -717,7 +717,7 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
{
size_t len, printed;
- len = scm_i_string_length (exp);
+ printed = len = scm_i_string_length (exp);
if (SCM_WRITINGP (pstate))
{
printed = write_string (scm_i_string_data (exp),
@@ -727,10 +727,7 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
len += 2; /* account for the quotes */
}
else
- printed = display_string (scm_i_string_data (exp),
- scm_i_is_narrow_string (exp),
- len, port,
- PORT_CONVERSION_HANDLER (port));
+ scm_c_put_string (port, exp, 0, len);
if (SCM_UNLIKELY (printed < len))
scm_encoding_error (__func__, errno,