Re: More fixes for SBCL
Martin Simmons <[email protected]> Wed, 6 Jul 2011 19:16:38 +0100
| Newsgroups | gmane.lisp.cl-http |
|---|---|
| Message-ID | <[email protected]> |
Your change will break it on LispWorks, because (concatenate 'string ...) might make a base-string even though log-file-name contains non-base characters. I think the function string-type-symbol should be removed and all users changed to call string-append (defined just above string-type-symbol). -- Martin Simmons LispWorks Ltd http://www.lispworks.com/ >>>>> On Wed, 6 Jul 2011 22:30:04 +0800, Chun Tian (binghe) said: > > SBCL's string type is (SIMPLE-ARRAY CHARACTER ...): > > * (type-of "xxx") > > (SIMPLE-ARRAY CHARACTER (3)) > > This type, if processed by function 'string-type-symbol, only the part SIMPLE-ARRAY left, which cannot be used as a valid sequence type for 'concatenate. > > Attached patch fixed this, this was learnt from kpoeck the first time when I reported SBCL related bug. > > --binghe > > > Index: server/log.lisp > =================================================================== > --- server/log.lisp (revision 91) > +++ server/log.lisp (revision 92) > @@ -354,7 +354,7 @@ > > (defmethod %file-name-for-log ((log basic-log-mixin)) > (with-slots (log-file-name port) log > - (concatenate (string-type-symbol log-file-name) log-file-name "-" (write-to-string port :base 10.)))) > + (concatenate 'string log-file-name "-" (write-to-string port :base 10.)))) > > (define-generic initialize-log-filename (file-logging-mixin) > (declare (values log)) > @@ -777,7 +777,7 @@ > (values (write-to-string year :base 10.) > (format nil "~2,'0D" month) > (let ((name (pathname-external-name-string log-name))) > - (concatenate (string-type-symbol name) (write-iso-date year month day nil) "-" name)))))) > + (concatenate 'string (write-iso-date year month day nil) "-" name)))))) > (declare (inline date-name)) > (multiple-value-bind (year month name) > (date-name (pathname-name filename)) _______________________________________________ WWW-CL mailing list [email protected] https://lists.csail.mit.edu/mailman/listinfo/www-cl