mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
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'.
This commit is contained in:
parent
8f615cde45
commit
934b6dc398
2 changed files with 3 additions and 6 deletions
|
@ -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,
|
||||
|
|
|
@ -287,7 +287,7 @@
|
|||
(define exception:system-error
|
||||
(cons 'system-error ".*"))
|
||||
(define exception:encoding-error
|
||||
(cons 'encoding-error "(cannot convert.* to output locale|input (locale conversion|decoding) error)"))
|
||||
(cons 'encoding-error "(cannot convert.* to output locale|input (locale conversion|decoding) error|conversion to port encoding failed)"))
|
||||
(define exception:miscellaneous-error
|
||||
(cons 'misc-error "^.*"))
|
||||
(define exception:read-error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue