mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-22 04:30:19 +02:00
put-u8: Always write a single byte, regardless of the port encoding.
Previously, 'put-u8' used textual I/O to write a single character, relying on the usual practice of setting the port encoding to ISO-8859-1 for binary ports. * libguile/r6rs-ports.c (scm_put_u8): Use 'scm_c_write', not 'scm_putc'.
This commit is contained in:
parent
5b42fd80d7
commit
91b5b1631f
1 changed files with 1 additions and 1 deletions
|
@ -570,7 +570,7 @@ SCM_DEFINE (scm_put_u8, "put-u8", 2, 0, 0,
|
||||||
SCM_VALIDATE_BINARY_OUTPUT_PORT (1, port);
|
SCM_VALIDATE_BINARY_OUTPUT_PORT (1, port);
|
||||||
c_octet = scm_to_uint8 (octet);
|
c_octet = scm_to_uint8 (octet);
|
||||||
|
|
||||||
scm_putc ((char) c_octet, port);
|
scm_c_write (port, &c_octet, 1);
|
||||||
|
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue