From: Christophe Rhodes Date: Wed, 7 Dec 2005 15:57:21 +0000 (+0000) Subject: 0.9.7.19: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=830db48da09c88c0e91b11e2991d21b2a1af2579;p=sbcl.git 0.9.7.19: Merge patch (DL "external-formats problem..." 2005-12-03 sbcl-devel) ... and (fixed) test case 2005-12-07 --- diff --git a/NEWS b/NEWS index 74e9562..93a54e1 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ changes in sbcl-0.9.8 relative to sbcl-0.9.7: * bug fix: FILE-STRING-LENGTH is now external-format sensitive, returning the number of octets which would be written to the file-stream. (thanks to Robert J. Macomber) + * bug fix: the SB-SIMPLE-STREAMS contrib passes external-format + arguments to the internal stream functions. (thanks to David + Lichteblau) * optimization: improved type inference for arithmetic-for index variables in LOOP * optimization: faster floating-point SQRT on x86-64 diff --git a/contrib/sb-simple-streams/fndb.lisp b/contrib/sb-simple-streams/fndb.lisp index ad29bbc..237cb93 100644 --- a/contrib/sb-simple-streams/fndb.lisp +++ b/contrib/sb-simple-streams/fndb.lisp @@ -72,7 +72,7 @@ TODO (rudi 2003-05-19): make the above work, make (defknown open) use it. :rename-and-delete :overwrite :append :supersede nil)) (:if-does-not-exist (member :error :create nil)) - (:external-format (member :default)) + (:external-format keyword) (:class (or symbol class)) (:mapped (member t nil)) (:input-handle (or null fixnum stream)) diff --git a/contrib/sb-simple-streams/internal.lisp b/contrib/sb-simple-streams/internal.lisp index dacfb86..8b32d9e 100644 --- a/contrib/sb-simple-streams/internal.lisp +++ b/contrib/sb-simple-streams/internal.lisp @@ -621,8 +621,7 @@ (type (member :input :output :io :probe) direction) (type (member :error :new-version :rename :rename-and-delete :overwrite :append :supersede nil) if-exists) - (type (member :error :create nil) if-does-not-exist) - (ignore external-format)) + (type (member :error :create nil) if-does-not-exist)) (let ((filespec (merge-pathnames pathname))) (multiple-value-bind (fd namestring original delete-original) (%fd-open filespec direction if-exists if-exists-given @@ -640,7 +639,8 @@ :pathname pathname :dual-channel-p nil :input-buffer-p t - :auto-close t)) + :auto-close t + :external-format external-format)) (:probe (let ((stream (sb-impl::%make-fd-stream :name namestring :fd fd :pathname pathname diff --git a/contrib/sb-simple-streams/simple-stream-tests.lisp b/contrib/sb-simple-streams/simple-stream-tests.lisp index 0577d03..557fb63 100644 --- a/contrib/sb-simple-streams/simple-stream-tests.lisp +++ b/contrib/sb-simple-streams/simple-stream-tests.lisp @@ -908,3 +908,19 @@ Nothing to see here, move along.") (deftest string-simple-stream-1 (values (subtypep 'string-simple-stream 'string-stream)) T) + +;; don't break fd-stream external-format support: + +(deftest external-format-1 + (progn + (with-open-file (s *test-file* + :direction :output + :if-exists :supersede + :element-type '(unsigned-byte 8)) + (write-byte 195 s) + (write-byte 132 s)) + (with-open-file (s *test-file* + :direction :input + :external-format :utf-8) + (char-code (read-char s)))) + 196) diff --git a/version.lisp-expr b/version.lisp-expr index ec2a5be..5907599 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.7.18" +"0.9.7.19"