diff --git a/src/lsp/setf.lsp b/src/lsp/setf.lsp index 901fa623e..9f72d8714 100644 --- a/src/lsp/setf.lsp +++ b/src/lsp/setf.lsp @@ -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)