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 generic setf for gray:stream-element-type #1530

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
for Gray streams.
* Generic versions of `cl:pathname` and `cl:truename`, both of which
are available after the Gray stream modules is required.
* Generic `(setf gray:stream-element-type)` for basic support of
bivalent streams.

## Changed
* `cl:format` and `pprint` now respect the value returned bye
Expand Down
6 changes: 6 additions & 0 deletions src/lisp/kernel/clos/streams.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
STREAM. The class FUNDAMENTAL-CHARACTER-STREAM provides a default method
which returns CHARACTER."))

(defgeneric (setf stream-element-type) (new-value stream)
(:documentation
"Set the type specifier of the kind of object returned by the
STREAM. There is no default method as this is optional and only
needed for bivalent streams."))

(defgeneric stream-finish-output (stream)
(:documentation
"Attempts to ensure that all output sent to the Stream has reached
Expand Down