From: Christophe Rhodes Date: Sat, 1 Jan 2005 21:01:27 +0000 (+0000) Subject: 0.8.18.9: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=753dce93f5d66a14851a8f4b27d90c7934d77778;p=sbcl.git 0.8.18.9: Merge a couple of patches ... a bug in 'filesys.lisp' (Artem V. Andreev); ... (coerce #c(1 2) '(complex float)) => error (Vincent Arkesteijn) --- diff --git a/NEWS b/NEWS index 4922f52..cc8769e 100644 --- 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 diff --git a/src/code/coerce.lisp b/src/code/coerce.lisp index 575083f..59bd1da 100644 --- a/src/code/coerce.lisp +++ b/src/code/coerce.lisp @@ -179,6 +179,9 @@ ((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 diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index aa8b501..36810cb 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -318,7 +318,7 @@ (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 diff --git a/tests/arith.pure.lisp b/tests/arith.pure.lisp index 8d1d12b..88bb515 100644 --- a/tests/arith.pure.lisp +++ b/tests/arith.pure.lisp @@ -44,6 +44,10 @@ (assert (= (coerce 1/2 '(complex float)) #c(0.5 0.0))) (assert (= (coerce 1.0d0 '(complex float)) #c(1.0d0 0.0d0))) +;;; (COERCE #c( ) '(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. diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index b9a416e..bb23ae0 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -315,8 +315,8 @@ (assert (equal (read-from-string (format nil "~S" p)) p))) (print-not-readable () nil)))) -;;; 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")) @@ -335,6 +335,9 @@ ;;; ENOUGH-NAMESTRING should probably not fail when the namestring in ;;; question has a :RELATIVE pathname. (assert (equal (enough-namestring #p"foo" #p"./") "foo")) - + +;;; bug reported by Artem V. Andreev: :WILD not handled in unparsing +;;; directory lists. +(assert (equal (namestring #p"/tmp/*/") "/tmp/*/")) ;;;; success (quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index 1ebf629..58be0a4 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.8.18.8" +"0.8.18.9"