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

Anton Vodonosov avodonosov at yandex.ru
Sun Mar 10 06:42:53 UTC 2013


Fixed cl+ss by changing 
(defclass ssl-stream
    (fundamental-binary-input-stream
     fundamental-binary-output-stream
     trivial-gray-stream-mixin)

to

(defclass ssl-stream
    (trivial-gray-stream-mixin
     fundamental-binary-input-stream
     fundamental-binary-output-stream)

Further discussion of fixing trivial-gray-streams will happen on
trivial-gray-streams-devel.

Best regards,
- Anton

10.03.2013, 04:08, "Anton Vodonosov" <avodonosov at yandex.ru>:
> 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
>
> _______________________________________________
> cl-plus-ssl-devel mailing list
> cl-plus-ssl-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cl-plus-ssl-devel




More information about the trivial-gray-streams-devel mailing list