0.8.18.9:
authorChristophe Rhodes <csr21@cam.ac.uk>
Sat, 1 Jan 2005 21:01:27 +0000 (21:01 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Sat, 1 Jan 2005 21:01:27 +0000 (21:01 +0000)
Merge a couple of patches
... a bug in 'filesys.lisp' (Artem V. Andreev);
... (coerce #c(1 2) '(complex float)) => error (Vincent Arkesteijn)

NEWS
src/code/coerce.lisp
src/code/filesys.lisp
tests/arith.pure.lisp
tests/pathnames.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 4922f52..cc8769e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,10 @@ changes in sbcl-0.8.19 relative to sbcl-0.8.18:
     to MAKE-INSTANCE.
   * bug fix: defaulted initargs are passed to INITIALIZE-INSTANCE and
     SHARED-INITIALIZE methods from compiled calls to MAKE-INSTANCE.
+  * bug fix: COERCE to (COMPLEX FLOAT) of a complex number no longer
+    produces an error.  (thanks to Vincent Arkesteijn)
+  * bug fix: NAMESTRING on pathnames with :WILD components in their
+    directories works correctly.  (thanks to Artem V. Andreev)
 
 changes in sbcl-0.8.18 relative to sbcl-0.8.17:
   * new feature: reloading changed shared object files with
index 575083f..59bd1da 100644 (file)
                     ((csubtypep type (specifier-type '(complex long-float)))
                      (complex (%long-float (realpart object))
                               (%long-float (imagpart object))))
+                     ((csubtypep type (specifier-type '(complex float)))
+                      (complex (%single-float (realpart object))
+                               (%single-float (imagpart object))))
                     ((and (typep object 'rational)
                           (csubtypep type (specifier-type '(complex float))))
                      ;; Perhaps somewhat surprisingly, ANSI specifies
index aa8b501..36810cb 100644 (file)
           (error ":BACK cannot be represented in namestrings."))
          ((member :wild-inferiors)
           (pieces "**/"))
-         ((or simple-string pattern)
+         ((or simple-string pattern (member :wild))
           (pieces (unparse-unix-piece dir))
           (pieces "/"))
          (t
index 8d1d12b..88bb515 100644 (file)
 (assert (= (coerce 1/2 '(complex float)) #c(0.5 0.0)))
 (assert (= (coerce 1.0d0 '(complex float)) #c(1.0d0 0.0d0)))
 
+;;; (COERCE #c(<RATIONAL> <RATIONAL>) '(complex float)) resulted in
+;;; an error up to 0.8.17.31
+(assert (= (coerce #c(1 2) '(complex float)) #c(1.0 2.0)))
+
 ;;; COERCE also sometimes failed to verify that a particular coercion
 ;;; was possible (in particular coercing rationals to bounded float
 ;;; types.
index b9a416e..bb23ae0 100644 (file)
          (assert (equal (read-from-string (format nil "~S" p)) p)))
       (print-not-readable () nil))))
 \f
-;;; BUG 330: "PARSE-NAMESTRING should accept namestrings as the default argument"
-;;; ...and streams as well
+;;; BUG 330: "PARSE-NAMESTRING should accept namestrings as the
+;;; default argument" ...and streams as well
 (assert (equal (parse-namestring "foo" nil "/")
               (parse-namestring "foo" nil #P"/")))
 (let ((test "parse-namestring-test.tmp"))
 ;;; ENOUGH-NAMESTRING should probably not fail when the namestring in
 ;;; question has a :RELATIVE pathname.
 (assert (equal (enough-namestring #p"foo" #p"./") "foo"))
-
+\f
+;;; bug reported by Artem V. Andreev: :WILD not handled in unparsing
+;;; directory lists.
+(assert (equal (namestring #p"/tmp/*/") "/tmp/*/"))
 ;;;; success
 (quit :unix-status 104)
index 1ebf629..58be0a4 100644 (file)
@@ -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.8.18.8"
+"0.8.18.9"