mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 04:52:42 -08:00
SETF for structures that are specialized vectors
This commit is contained in:
parent
b9436ff2f2
commit
7308dc932d
1 changed files with 5 additions and 2 deletions
|
|
@ -316,8 +316,11 @@ Does not check if the third gang is a single-element list."
|
|||
|
||||
(defun setf-structure-access (struct type index newvalue)
|
||||
(declare (si::c-local))
|
||||
(case type
|
||||
((LIST VECTOR) `(sys:elt-set ,struct ,index ,newvalue))
|
||||
(cond
|
||||
((or (eq type 'list) (eq type 'vector))
|
||||
`(sys:elt-set ,struct ,index ,newvalue))
|
||||
((consp type)
|
||||
`(si::aset ,newvalue (the ,type ,struct) ,index))
|
||||
(t `(sys::structure-set ,struct ',type ,index ,newvalue))))
|
||||
|
||||
(defun setf-expand (l env)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue