(reported by Markus Krummenacker)
* bug fix: FORMATTER can successfully compile pretty-printer format
strings which use variants of the ~* directive inside.
+ * bug fix: SEARCH now applies its TEST predicate to the elements of
+ the arguments in the correct order. (thanks to Wolfhard Buss)
* fixed some bugs revealed by Paul Dietz' test suite:
** NIL is now allowed as a structure slot name.
** arbitrary numbers, not just reals, are allowed in certain
((or (null main) (null sub) (= (the fixnum end1) jndex))
t)
(declare (fixnum jndex))
- (compare-elements (car main) (car sub))))
+ (compare-elements (car sub) (car main))))
(sb!xc:defmacro search-compare-list-vector (main sub)
`(do ((main ,main (cdr main))
(index start1 (1+ index)))
((or (null main) (= index (the fixnum end1))) t)
(declare (fixnum index))
- (compare-elements (car main) (aref ,sub index))))
+ (compare-elements (aref ,sub index) (car main))))
(sb!xc:defmacro search-compare-vector-list (main sub index)
`(do ((sub (nthcdr start1 ,sub) (cdr sub))
(index ,index (1+ index)))
((or (= (the fixnum end1) jndex) (null sub)) t)
(declare (fixnum jndex index))
- (compare-elements (aref ,main index) (car sub))))
+ (compare-elements (car sub) (aref ,main index))))
(sb!xc:defmacro search-compare-vector-vector (main sub index)
`(do ((index ,index (1+ index))
(sub-index start1 (1+ sub-index)))
((= sub-index (the fixnum end1)) t)
(declare (fixnum sub-index index))
- (compare-elements (aref ,main index) (aref ,sub sub-index))))
+ (compare-elements (aref ,sub sub-index) (aref ,main index))))
(sb!xc:defmacro search-compare (main-type main sub index)
(if (eq main-type 'list)
(t
'*))
,(cond ((constant-continuation-p dims)
- (let ((val (continuation-value dims)))
- (if (listp val) val (list val))))
+ (let* ((val (continuation-value dims))
+ (cdims (if (listp val) val (list val))))
+ (if (or simple (/= (length cdims) 1))
+ cdims
+ '(*))))
((csubtypep (continuation-type dims)
(specifier-type 'integer))
'(*))
(vector-push-extend #\a complex-t)
(assert (= (length complex-t) 4))
(assert (raises-error? (vector-push-extend #\b simple-t))))))
+
+(multiple-value-bind (fp1 index fp2 bool)
+ (let ((a (make-array '(5) :fill-pointer 5 :adjustable 5
+ :initial-contents '(a b c d e))))
+ (values (fill-pointer a)
+ (vector-push-extend 'x a)
+ (fill-pointer a)
+ (<= (array-total-size a) 5)))
+ (assert (= fp1 5))
+ (assert (= index 5))
+ (assert (= fp2 6))
+ (assert (not bool)))