[cl-plus-ssl-devel] trivial-gray-stream-mixin in cl+ssl

Anton Vodonosov avodonosov at yandex.ru
Sat Mar 9 23:54:28 UTC 2013


Hello James,

Thanks for the report.

Indeed, unpleasant subtle issue. You are on CLISP or CCL, right?

I am thinking how to fix it in trivial-gray-streams. If it will be impossible/difficult,
then I will just fix cl+ssl as you suggests.

Forwarding to both mailing lists for now.

Best regards,
- Anton


10.03.2013, 00:10, "James M. Lawrence" <llmjjmll at gmail.com>:
> Hello, I noticed that cl+ssl has the same issue that I recently had
> with gray streams.
>
> (defclass my-stream
>     (trivial-gray-streams:fundamental-binary-input-stream
>      trivial-gray-streams:fundamental-binary-output-stream
>      trivial-gray-streams:trivial-gray-stream-mixin)
>   ())
>
> (defmethod trivial-gray-streams:stream-write-byte
>     ((stream my-stream) byte)
>   (format t "~&write-byte ~s~%" byte))
>
> (defmethod trivial-gray-streams:stream-write-sequence
>     ((stream my-stream) seq start end &key)
>   (format t "~&write-sequence ~s ~s ~s~%" seq start end))
>
> (defun test ()
>   (write-sequence #(3 4 5) (make-instance 'my-stream)))
>
> CL-USER> (test)
> write-byte 3
> write-byte 4
> write-byte 5
>
> The mixin should be the first superclass. With that change, we get
>
> CL-USER> (test)
> write-sequence #(3 4 5) 0 3
>
> Best,
> James




More information about the cl-plus-ssl-devel mailing list