From 2b8bfd6891818fd0ba0f3a3619fd81ee96f4588f Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Tue, 11 Jan 2005 13:47:10 +0000 Subject: [PATCH] MAKE-STRING-OUTPUT-STREAM now checks the validity of the :ELEMENT-TYPE. --- src/CHANGELOG | 2 ++ src/c/file.d | 4 ++++ src/lsp/iolib.lsp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CHANGELOG b/src/CHANGELOG index 0b3f3bd2a..29e2dd3bf 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -36,6 +36,8 @@ ECL 1.0 - In the compiled code, special declarations affected the expressions in the binding forms as well. + - MAKE-STRING-OUTPUT-STREAM now checks the validity of the :ELEMENT-TYPE. + * Visible changes: - SI:MKSTEMP now accepts and returns pathnames. diff --git a/src/c/file.d b/src/c/file.d index dcb0158e8..6aa061ff2 100644 --- a/src/c/file.d +++ b/src/c/file.d @@ -2395,6 +2395,10 @@ for the string ~S.", @(defun make-string-output-stream (&key (element_type @'base-char')) @ + if (Null(cl_subtypep(element_type, @'character'))) { + FEerror("In MAKE-STRING-OUTPUT-STREAM, the argument :ELEMENT-TYPE (~A) must be a subtype of character", + 1, element_type); + } @(return make_string_output_stream(128)) @) diff --git a/src/lsp/iolib.lsp b/src/lsp/iolib.lsp index 7748bc054..be2b78a6c 100644 --- a/src/lsp/iolib.lsp +++ b/src/lsp/iolib.lsp @@ -46,7 +46,7 @@ Evaluates FORMs with VAR bound to a string output stream to the string that is the value of STRING-FORM. If STRING-FORM is not given, a new string is used. The stream is automatically closed on exit and the string is returned." (if string - `(LET ((,var (MAKE-STRING-OUTPUT-STREAM-FROM-STRING ,string))) + `(LET ((,var (MAKE-STRING-OUTPUT-STREAM-FROM-STRING ,string ,@r))) ,@body) `(LET ((,var (MAKE-STRING-OUTPUT-STREAM ,@r))) ,@body