From: Christophe Rhodes Date: Thu, 30 Sep 2004 13:48:49 +0000 (+0000) Subject: 0.8.15.1: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=8acf21d3c2069a7ba1de3c3c139ef22215fcbcea;p=sbcl.git 0.8.15.1: Fix POSITION on displaced vectors (PFD tests). ... whoops! ... (you know, it's good not to have to think of a tagline for commits once in a while :-) --- diff --git a/NEWS b/NEWS index b3d7f5f..341c3cc 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +changes in sbcl-0.8.16 relative to sbcl-0.8.15: + * fixed some bugs revealed by Paul Dietz' test suite: + ** POSITION on displaced vectors with non-zero displacement + returns the right answer. + changes in sbcl-0.8.15 relative to sbcl-0.8.14: * incompatible change: SB-INT:*BEFORE-SAVE-INITIALIZATIONS* and SB-INT:*AFTER-SAVE-INITIALIZATIONS* have been renamed diff --git a/src/code/seq.lisp b/src/code/seq.lisp index 5afbc7f..ed0ff84 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -2006,7 +2006,7 @@ (simple-base-string (frob2)) (t (vector*-frob sequence)))) (declare (type (or index null) p)) - (values f (and p (the index (+ p offset)))))))))) + (values f (and p (the index (- p offset)))))))))) (defun %find-position (item sequence-arg from-end start end key test) (macrolet ((frob (sequence from-end) `(%find-position item ,sequence diff --git a/tests/seq.pure.lisp b/tests/seq.pure.lisp index ae9ea86..2217ee4 100644 --- a/tests/seq.pure.lisp +++ b/tests/seq.pure.lisp @@ -168,3 +168,10 @@ (s2 (fill s1 #\z))) (assert s2) (assert (string= s2 "zzzzz"))) + +;;; POSITION on dispaced arrays with non-zero offset has been broken +;;; for quite a while... +(let ((fn (compile nil '(lambda (x) (position x))))) + (let* ((x #(1 2 3)) + (y (make-array 2 :displaced-to x :displaced-index-offset 1))) + (assert (= (position 2 y) 0)))) diff --git a/version.lisp-expr b/version.lisp-expr index d0e7ce9..e36358c 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.15" +"0.8.15.1"