MAKE-STRING-OUTPUT-STREAM now checks the validity of the :ELEMENT-TYPE.

This commit is contained in:
jjgarcia 2005-01-11 13:47:10 +00:00
parent 3882176d59
commit 2b8bfd6891
3 changed files with 7 additions and 1 deletions

View file

@ -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.

View file

@ -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))
@)

View file

@ -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