Let (%)read-delimited! ensure that the buffer is mutable.
This commit is contained in:
parent
ec4ec22eac
commit
5f3c53746f
|
@ -191,7 +191,8 @@
|
||||||
(let-optionals args ((port (current-input-port))
|
(let-optionals args ((port (current-input-port))
|
||||||
(start 0)
|
(start 0)
|
||||||
(end (string-length buf)))
|
(end (string-length buf)))
|
||||||
|
(if (immutable? buf)
|
||||||
|
(error "Immutable buffer argument to %read-delimited!" buf))
|
||||||
(let ((delims (x->char-set delims)))
|
(let ((delims (x->char-set delims)))
|
||||||
(let lp ((start start) (total 0))
|
(let lp ((start start) (total 0))
|
||||||
(receive (terminator num-read)
|
(receive (terminator num-read)
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
(define-structure delimited-readers delimited-readers-interface
|
(define-structure delimited-readers delimited-readers-interface
|
||||||
(open scheme
|
(open scheme
|
||||||
byte-vectors
|
byte-vectors
|
||||||
|
(subset primitives (immutable?))
|
||||||
signals ; ERROR
|
signals ; ERROR
|
||||||
let-opt
|
let-opt
|
||||||
receiving
|
receiving
|
||||||
|
|
Loading…
Reference in New Issue