diff options
author | Neil Jerram <neil@ossau.uklinux.net> | 2008-11-23 22:37:23 +0000 |
---|---|---|
committer | Neil Jerram <neil@ossau.uklinux.net> | 2008-11-23 22:48:26 +0000 |
commit | 6d2275560d32a157e1d26b15cdd73fb80daef526 (patch) | |
tree | 0f4951d1477bbe4e786aa0ac24217fa2f501974c /lib/full-write.c | |
parent | c9e44fd755ae3bba217f3ae053d4ffc1c26ddc57 (diff) | |
download | guile-6d2275560d32a157e1d26b15cdd73fb80daef526.tar.gz |
Make scm_c_read use caller buffer only for unbuffered ports.
We recently modified scm_c_read so that it temporarily swaps the
caller's buffer with the port's normal read buffer, in order to
improve performance in the case where the port is unbuffered (which
actually means having a single-byte buffer) - but we implemented the
swap in the buffered case too. The latter turns out to be a bad idea
- because it means that the C code of a custom port implementation
cannot rely on a port's buffer always being the same as when it was
first set up - and so this commit reverts that. The buffer swapping
trick now applies to unbuffered ports only.
* libguile/ports.c (scm_c_read): Only do swapping of port and caller
buffer for unbuffered ports.
Diffstat (limited to 'lib/full-write.c')
0 files changed, 0 insertions, 0 deletions