[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: force-output vs. serial streams
- To: firstname.lastname@example.org (Tom McDougal)
- Subject: Re: force-output vs. serial streams
- From: email@example.com (Bill St. Clair)
- Date: Fri, 6 Mar 1992 12:24:19 -0500
- Cc: info-mcl
>>FORCE-OUTPUT and its likenesses are not defined for serial streams (using
>>"serial-streams.lisp"). Is it okay for me to create a null method for
>>this? Is there a specific reason it was not defined?
>Sounds like an oversight. Creating a null method would be fine.
>The proper fix is probably to change the class definition so that
>a serial-stream inherits the output-stream method for stream-force-ouput
>which does nothing:
>(defclass serial-stream (driver input-stream output-stream)
> ((serial-unread-char :initform nil))
> (:default-initargs :driver-buffer-size 4))
>I say "probably" because I haven't tested this.
After looking at the code a little bit, I see that, though this solution
will probably work, it's not correct. MAKE-SERIAL-A (MAKE-SERIAL-B)
makes a two way stream. Both the input & output side are instances
of SERIAL-STREAM. They should really be instances of INPUT-SERIAL-STREAM
and OUTPUT-SERIAL-STREAM respectively (which don't exist, yet).