Let (%)read-delimited! ensure that the buffer is mutable.

This commit is contained in:
mainzelm 2005-10-18 14:58:11 +00:00
parent ec4ec22eac
commit 5f3c53746f
2 changed files with 3 additions and 1 deletions

View File

@ -191,7 +191,8 @@
(let-optionals args ((port (current-input-port))
(start 0)
(end (string-length buf)))
(if (immutable? buf)
(error "Immutable buffer argument to %read-delimited!" buf))
(let ((delims (x->char-set delims)))
(let lp ((start start) (total 0))
(receive (terminator num-read)

View File

@ -54,6 +54,7 @@
(define-structure delimited-readers delimited-readers-interface
(open scheme
byte-vectors
(subset primitives (immutable?))
signals ; ERROR
let-opt
receiving