Skip to content

Add open-p slot to FUNDAMENTAL-STREAM and update default methods#469

Open
yitzchak wants to merge 2 commits intoClozure:masterfrom
yitzchak:gray
Open

Add open-p slot to FUNDAMENTAL-STREAM and update default methods#469
yitzchak wants to merge 2 commits intoClozure:masterfrom
yitzchak:gray

Conversation

@yitzchak
Copy link
Copy Markdown
Contributor

@yitzchak yitzchak commented Dec 14, 2023

Currently the CLOSE and OPEN-STREAM-P implementations do not conform to the Gray stream proposal. Specifically, the Gray stream proposal states the following for CLOSE and OPEN-STREAM-P:

  CLOSE  stream &key abort			[Generic Function]

    The existing function CLOSE is redefined to be a generic function, but
    otherwise behaves the same.  The default method provided by class
    FUNDAMENTAL-STREAM sets a flag for OPEN-STREAM-P.  The value returned
    by CLOSE will be as specified by the issue CLOSED-STREAM-OPERATIONS.

  OPEN-STREAM-P stream				[Generic Function]

    This function [from proposal STREAM-ACCESS] is made generic.  A
    default method is provided by class FUNDAMENTAL-STREAM which returns
    true if CLOSE has not been called on the stream.

I've added a slot OPEN-P to FUNDAMENTAL-STREAM and added the needed default methods.

Also fixed the STREAM-LISTEN method so that it returns NIL when STREAM-READ-CHAR-NO-HANG returns :EOF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant