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

Fix error return on gray read-byte #1524

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Fix error return on gray read-byte #1524

merged 2 commits into from
Nov 30, 2023

Conversation

yitzchak
Copy link
Member

@yitzchak yitzchak commented Nov 30, 2023

Currently cl:read-byte ignores eof-error-p and eof-value arguments for Gray streams. clasp_read_byte already handles EOF correctly via the dispatch tables so I just removed the unneeded special code for Gray streams.

@yitzchak yitzchak marked this pull request as ready for review November 30, 2023 10:58
@yitzchak yitzchak requested a review from Bike November 30, 2023 10:58
return eof_value;

ERROR_END_OF_FILE(strm);

return c;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this return reachable? ERROR_END_OF_FILE is properly [[noreturn]], i hope

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess it should be inverted or removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And lisp_error is [[noreturn]] so that is fine.

@yitzchak yitzchak merged commit 730b22c into main Nov 30, 2023
8 checks passed
@yitzchak yitzchak deleted the fix-read-byte branch November 30, 2023 17:05
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.

2 participants