mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
'scm_c_read' goes through the fast path with ISO-8859-1 unbuffered ports.
Discussed in <http://bugs.gnu.org/15368>. * libguile/ports.c (scm_c_read): Enter the 'swap_buffer' case when pt->encoding is "ISO-8859-1".
This commit is contained in:
parent
d360671c1c
commit
c61be45084
1 changed files with 3 additions and 1 deletions
|
@ -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
|
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
|
call does not guarantee to fill the whole of the port's read
|
||||||
buffer.) */
|
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
|
/* The port that we are reading from is unbuffered - i.e. does
|
||||||
not have its own persistent buffer - but we have a buffer,
|
not have its own persistent buffer - but we have a buffer,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue