From 7c5173d4d1b22da5890c7479f69049b5e24ee3aa Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Tue, 12 Dec 2023 19:13:33 -0500 Subject: [PATCH 1/2] Add SETF for STREAM-ELEMENT-TYPE --- src/lisp/kernel/clos/streams.lisp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lisp/kernel/clos/streams.lisp b/src/lisp/kernel/clos/streams.lisp index 87ca98d77a..1cf2c5f98e 100644 --- a/src/lisp/kernel/clos/streams.lisp +++ b/src/lisp/kernel/clos/streams.lisp @@ -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 From 56746521baec615df58e78c1a32c12e386e89e66 Mon Sep 17 00:00:00 2001 From: "Tarn W. Burton" Date: Tue, 12 Dec 2023 19:15:04 -0500 Subject: [PATCH 2/2] Update release notes --- RELEASE_NOTES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e770c1cf11..7f1cb36724 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -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