[cl-plus-ssl-devel] trivial-gray-streams SBCL file-position patch
Bart Botta
00003b at gmail.com
Fri Oct 2 13:38:34 UTC 2009
following patch adds support for FILE-POSITION to trivial-gray-streams
on sbcl (requires sbcl 1.0.2 or so)
-
3b
===================================================================
RCS file: /project/cl-plus-ssl/cvsroot/trivial-gray-streams/mixin.lisp,v
retrieving revision 1.7
diff -u -r1.7 mixin.lisp
--- mixin.lisp 1 Nov 2008 03:13:22 -0000 1.7
+++ mixin.lisp 2 Oct 2009 11:30:45 -0000
@@ -142,6 +142,10 @@
(defmethod sb-gray:stream-write-sequence
((s trivial-gray-stream-mixin) seq &optional start end)
(stream-write-sequence s seq (or start 0) (or end (length seq))))
+ (defmethod sb-gray:stream-file-position ((stream
trivial-gray-stream-mixin) &optional position)
+ (if position
+ (setf (stream-file-position stream) position)
+ (stream-file-position stream)))
;; SBCL extension:
(defmethod sb-gray:stream-line-length ((stream trivial-gray-stream-mixin))
80))
More information about the cl-plus-ssl-devel
mailing list