Both gray:stream-read-sequence and gray:stream-write-sequence are supposed to accept (and pass down) a stream and a sequence, in that order. The actual order of the parameters, however, is the reverse.
Logged In: YES
I fixed the doc, thanks.
Logged In: YES
It's also necessary to change as follows (because in the
stream-read-byte-sequence and friends stream is the first param):
--- gray.lisp 2008-05-28 17:44:32.873125000 +0300
+++ gray.fixed.lisp 2008-05-28 17:45:42.341875000 +0300
@@ -161,17 +161,17 @@
(clos:defgeneric stream-read-sequence (sequence stream &key start end)
(:method (sequence (stream fundamental-binary-input-stream) &key start end)
- (stream-read-byte-sequence sequence stream start end))
+ (stream-read-byte-sequence stream sequence start end))
(:method (sequence (stream fundamental-character-input-stream) &key start end)
- (stream-read-char-sequence sequence stream start end))
+ (stream-read-char-sequence stream sequence start end))
(:method (sequence (stream fundamental-input-stream) &rest rest)
(apply #'sys::%read-sequence sequence stream rest)))
(clos:defgeneric stream-write-sequence (sequence stream &key start end)
(:method (sequence (stream fundamental-binary-output-stream) &key start end)
- (stream-write-byte-sequence sequence stream start end))
+ (stream-write-byte-sequence stream sequence start end))
(:method (sequence (stream fundamental-character-output-stream) &key start end)
- (stream-write-char-sequence sequence stream start end))
+ (stream-write-char-sequence stream sequence start end))
(:method (sequence (stream fundamental-output-stream) &rest rest)
(apply #'sys::%write-sequence sequence stream rest)))
Perhaps it would have been better if we had made stream the first
parameter of the stream-read-sequence as well, but on the other
hand standard read-sequence has has sequence the first.
thank you for your bug report.
the bug has been fixed in the CVS tree.
you can either wait for the next release (recommended)
or check out the current CVS tree (see http://clisp.cons.org\)
and build CLISP from the sources (be advised that between
releases the CVS tree is very unstable and may not even build
on your platform).
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.