[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 06/07: put-u8: Always write a single byte, regardless of
From: |
Mark H. Weaver |
Subject: |
[Guile-commits] 06/07: put-u8: Always write a single byte, regardless of the port encoding. |
Date: |
Tue, 7 May 2019 04:46:50 -0400 (EDT) |
mhw pushed a commit to branch stable-2.2
in repository guile.
commit 91b5b1631f87067a63cb0b50df5dbfce977c18c7
Author: Mark H Weaver <address@hidden>
Date: Wed May 1 05:20:36 2019 -0400
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'.
---
libguile/r6rs-ports.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c
index c1cbbdf..16c1480 100644
--- a/libguile/r6rs-ports.c
+++ b/libguile/r6rs-ports.c
@@ -570,7 +570,7 @@ SCM_DEFINE (scm_put_u8, "put-u8", 2, 0, 0,
SCM_VALIDATE_BINARY_OUTPUT_PORT (1, port);
c_octet = scm_to_uint8 (octet);
- scm_putc ((char) c_octet, port);
+ scm_c_write (port, &c_octet, 1);
return SCM_UNSPECIFIED;
}
- [Guile-commits] branch stable-2.2 updated (6381845 -> 7c2b48a), Mark H. Weaver, 2019/05/07
- [Guile-commits] 02/07: Fix typo in comment., Mark H. Weaver, 2019/05/07
- [Guile-commits] 05/07: Optimize fixnum exact integer square roots., Mark H. Weaver, 2019/05/07
- [Guile-commits] 03/07: Fix indentation in scm_sum., Mark H. Weaver, 2019/05/07
- [Guile-commits] 04/07: Avoid 'with-latin1-locale' in binary I/O tests., Mark H. Weaver, 2019/05/07
- [Guile-commits] 07/07: Strings, i18n: Limit the use of alloca to approximately 8 kilobytes., Mark H. Weaver, 2019/05/07
- [Guile-commits] 06/07: put-u8: Always write a single byte, regardless of the port encoding.,
Mark H. Weaver <=
- [Guile-commits] 01/07: Add 'scm_c_make_char' and use it where appropriate., Mark H. Weaver, 2019/05/07