[Bug-openmcl] quick with-output-to-string fix

bryan o'connor bryan-openmcl at lunch.org
Sat Feb 14 22:11:53 MST 2004


with-output-to-string was misquoting the element-type when
it was specified.

				...bryan


Index: lib/macros.lisp
===================================================================
RCS file: /usr/local/tmpcvs/ccl-0.14-dev/ccl/lib/macros.lisp,v
retrieving revision 1.13
diff -u -r1.13 macros.lisp
--- lib/macros.lisp	7 Feb 2004 22:20:17 -0000	1.13
+++ lib/macros.lisp	15 Feb 2004 04:29:55 -0000
@@ -1255,13 +1255,14 @@
  	(close ,var)
  	,@(if index `((setf ,index (string-input-stream-index ,var))))))))

-(defmacro with-output-to-string ((var &optional string &key 
(element-type 'base-char))
-                                 &body body
+(defmacro with-output-to-string ((var &optional string &key 
element-type)
+                                 &body body
                                   &environment env)
    (multiple-value-bind (forms decls) (parse-body body env nil)
      `(let ((,var ,(if string
                      `(%make-string-output-stream ,string)
-                    `(make-string-output-stream :element-type 
',element-type))))
+                    `(make-string-output-stream
+                      :element-type ,(or element-type `'base-char)))))
         , at decls
         (unwind-protect
           (progn



More information about the Bug-openmcl mailing list