X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fgray-streams.lisp;h=b273412ff0c08d0aa100011caa14ad34cc63325b;hb=77869604fc3eb4417a630651e5fe40e74342ee59;hp=3603055199f2bd33d7453d93be747e5b20c37a17;hpb=562dd7fc01e2756b57439cb4ddfbc52e575728fb;p=sbcl.git diff --git a/src/pcl/gray-streams.lisp b/src/pcl/gray-streams.lisp index 3603055..b273412 100644 --- a/src/pcl/gray-streams.lisp +++ b/src/pcl/gray-streams.lisp @@ -226,6 +226,13 @@ &optional (start 0) (end nil)) (basic-io-type-stream-read-sequence stream seq start end #'stream-read-char)) + +(defmethod stream-read-sequence ((stream fundamental-binary-input-stream) + (seq sequence) + &optional (start 0) (end nil)) + (basic-io-type-stream-read-sequence stream seq start end + #'stream-read-byte)) + ;;; character output streams ;;; @@ -430,6 +437,16 @@ (:documentation "Implements WRITE-BYTE; writes the integer to the stream and returns the integer as the result.")) + +;; Provide a reasonable default for binary Gray streams. We might be +;; able to do better by specializing on the sequence type, but at +;; least the behaviour is reasonable. --tony 2003/05/08. +(defmethod stream-write-sequence ((stream fundamental-binary-output-stream) + (seq sequence) + &optional (start 0) (end nil)) + (basic-io-type-stream-write-sequence stream seq start end + #'stream-write-byte)) + ;;; This is not in the Gray stream proposal, so it is left here ;;; as example code.