X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-defstruct.lisp;h=89ced391872bce44bc1c1b592af15538bd512786;hb=d720bc359f03734ccb9baf66cb45dc01d623f369;hp=b36c483f6cbc6e9f05e8ae30126987e99776f82f;hpb=40660c4081a57a91e3cc3648a5aad3d3a95db938;p=sbcl.git diff --git a/src/code/target-defstruct.lisp b/src/code/target-defstruct.lisp index b36c483..89ced39 100644 --- a/src/code/target-defstruct.lisp +++ b/src/code/target-defstruct.lisp @@ -361,9 +361,9 @@ #!+sb-doc "Return a copy of STRUCTURE with the same (EQL) slot values." (declare (type structure-object structure)) - (let* ((len (%instance-length structure)) - (res (%make-instance len)) - (layout (%instance-layout structure)) + (let* ((layout (%instance-layout structure)) + (res (%make-instance (%instance-length structure))) + (len (layout-length layout)) (nuntagged (layout-n-untagged-slots layout))) (declare (type index len))