projects
/
platform
/
upstream
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b42fd8
)
put-u8: Always write a single byte, regardless of the port encoding.
author
Mark H Weaver
<mhw@netris.org>
Wed, 1 May 2019 09:20:36 +0000
(
05:20
-0400)
committer
Mark H Weaver
<mhw@netris.org>
Tue, 7 May 2019 08:41:15 +0000
(
04:41
-0400)
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
patch
|
blob
|
history
diff --git
a/libguile/r6rs-ports.c
b/libguile/r6rs-ports.c
index c1cbbdf3051b6f33c653705a8b041f41161b81b6..16c148090c3291786c426e94ec280b128cda5404 100644
(file)
--- 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;
}