From c61be45084d04b1db792b7e232f5bd77099f3287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 14 Oct 2013 22:24:48 +0200 Subject: [PATCH] 'scm_c_read' goes through the fast path with ISO-8859-1 unbuffered ports. Discussed in . * libguile/ports.c (scm_c_read): Enter the 'swap_buffer' case when pt->encoding is "ISO-8859-1". --- libguile/ports.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libguile/ports.c b/libguile/ports.c index 9068c5cfa..6f219d6d2 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -1657,7 +1657,9 @@ scm_c_read (SCM port, void *buffer, size_t size) requested number of bytes. (Note that a single scm_i_fill_input call does not guarantee to fill the whole of the port's read buffer.) */ - if (pt->read_buf_size <= 1 && pt->encoding == NULL) + if (pt->read_buf_size <= 1 && + (pt->encoding == NULL + || c_strcasecmp (pt->encoding, "ISO-8859-1") == 0)) { /* The port that we are reading from is unbuffered - i.e. does not have its own persistent buffer - but we have a buffer,