When displacing array A to B, ADJUST-ARRAY should not copy data from A to B.

This commit is contained in:
jjgarcia 2002-05-10 07:37:25 +00:00
parent 7b9899db80
commit 9d936beb41

View file

@ -351,13 +351,12 @@ adjustable array."
(push :element-type r)))
(let ((x (apply #'make-array new-dimensions :adjustable t r)))
(declare (array x))
(do ((cursor (make-list (length new-dimensions) :initial-element 0)))
(nil)
(when (apply #'array-in-bounds-p array cursor)
(apply #'aset (apply #'aref array cursor)
x
cursor))
(when (increment-cursor cursor new-dimensions)
(return nil)))
(unless displaced-to
(do ((cursor (make-list (length new-dimensions) :initial-element 0)))
(nil)
(when (apply #'array-in-bounds-p array cursor)
(apply #'aset (apply #'aref array cursor) x cursor))
(when (increment-cursor cursor new-dimensions)
(return nil))))
(sys:replace-array array x)
))