From 7308dc932d63990658d8470e60f627176151e3d2 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sat, 7 Feb 2009 16:44:51 +0100 Subject: [PATCH] SETF for structures that are specialized vectors --- src/lsp/setf.lsp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)