Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yitzchak
Copy link
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.

None yet

1 participant