[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

STREAMP and CLOS



    Date: Mon, 24 Feb 1992 12:51 EST
    From: bwild@azurro.fzi.de (Bernd Wild)

    We got a surprising result when applying STREAMP to an arbitrary CLOS  
    instance. It always returns T. This behavior has changed from Genera  
    8.0 to 8.1. While in 8.0 only "real" streams resulted in a T-value in  
    8.1 this can be observed for every instance.
    For example:

    (defclass aa ()())

    (setf my-aa (clos:make-instance 'aa))

    (streamp my-aa) => T

    We looked at the implementation of STREAMP: theu send a FLAVORS  
    :WHICH-OPERATIONS message to the CLOS instance and obtain a message  
    list which always contains the symbols :TYO and TYI which are  
    significant for a stream. 

    So, what's the correct predicate for checking anything for stream or  
    not?

I can't reproduce this.  I did

(clos:defclass foo () ())
(setq a (clos:make-instance 'foo))

(streamp a) => NIL

(send a :which-operations) => (:SEND-IF-HANDLES :WHICH-OPERATIONS :OPERATION-HANDLED-P :PRINT-SELF)

I'm running Genera 8.1.1, in case you're running plain 8.1.  I don't
think it should make a difference, though; none of the CLOS patches in
the ECO seem to relate to this.

                                                barmar