diff --git a/scsh/rdelim.scm b/scsh/rdelim.scm index d7ae751..aea1cae 100644 --- a/scsh/rdelim.scm +++ b/scsh/rdelim.scm @@ -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) diff --git a/scsh/scsh-package.scm b/scsh/scsh-package.scm index 33c080b..4d2da99 100644 --- a/scsh/scsh-package.scm +++ b/scsh/scsh-package.scm @@ -54,6 +54,7 @@ (define-structure delimited-readers delimited-readers-interface (open scheme byte-vectors + (subset primitives (immutable?)) signals ; ERROR let-opt receiving