X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-simple-streams%2Fstrategy.lisp;h=b080292694ce36555c8787b7ecd14688fb9600be;hb=1d46d379bb7a6424524b978f213ef69be5f1ad69;hp=ebbddf3fdd8ddafb60098a24782a5a406a8cdf70;hpb=68da29d2cd0b71b76c071102efbc807783657473;p=sbcl.git diff --git a/contrib/sb-simple-streams/strategy.lisp b/contrib/sb-simple-streams/strategy.lisp index ebbddf3..b080292 100644 --- a/contrib/sb-simple-streams/strategy.lisp +++ b/contrib/sb-simple-streams/strategy.lisp @@ -17,6 +17,7 @@ ;;;; Helper functions (defun refill-buffer (stream blocking) + (declare (type blocking blocking)) (with-stream-class (simple-stream stream) (let* ((unread (sm last-char-read-size stream)) (buffer (sm buffer stream)) @@ -140,7 +141,8 @@ (state (sm oc-state stream))) (flet ((input () (when (>= buffpos (sm buffer-ptr stream)) - (when (sc-dirty-p stream) + (when (and (not (any-stream-instance-flags stream :dual :string)) + (sc-dirty-p stream)) (flush-buffer stream t)) (let ((bytes (refill-buffer stream blocking))) (cond ((= bytes 0) @@ -216,7 +218,8 @@ (type boolean blocking) #|(optimize (speed 3) (space 2) (safety 0) (debug 0))|#) (with-stream-class (simple-stream stream) - (when (sc-dirty-p stream) + (when (and (not (any-stream-instance-flags stream :dual :string)) + (sc-dirty-p stream)) (flush-buffer stream t)) (do ((buffer (sm buffer stream)) (buffpos (sm buffpos stream))