mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-04 16:30:48 -08:00
When displacing array A to B, ADJUST-ARRAY should not copy data from A to B.
This commit is contained in:
parent
7b9899db80
commit
9d936beb41
1 changed files with 7 additions and 8 deletions
|
|
@ -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)
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue