diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-03-13 14:28:11 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-03-13 14:28:11 -0700 |
commit | 0550b8faf77b056e383ad332abbb4304acb8c512 (patch) | |
tree | 5383d25d4d9df3753ded4510a45a696d2a9d8c40 /src/util.lisp | |
parent | e4f4d8ebacc5b44cd110d201de5b26c90cc849be (diff) | |
download | consfigurator-0550b8faf77b056e383ad332abbb4304acb8c512.tar.gz |
REINIT-FROM-SIMPLE-PRINT: don't call REINITIALIZE-INSTANCE
This makes us more like MAKE-LOAD-FORM-SAVING-SLOTS.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/util.lisp')
-rw-r--r-- | src/util.lisp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/util.lisp b/src/util.lisp index f5d3498..63ca21a 100644 --- a/src/util.lisp +++ b/src/util.lisp @@ -228,10 +228,9 @@ symlinks. Not suitable for use by :POSIX properties." namestring)) (defun reinit-from-simple-print (class &rest slots) - (loop with object = (allocate-instance (find-class class)) - for (slot-name slot-value) on slots by #'cddr - do (setf (slot-value object slot-name) slot-value) - finally (return (reinitialize-instance object)))) + (aprog1 (allocate-instance (find-class class)) + (loop for (slot-name slot-value) on slots by #'cddr + do (setf (slot-value it slot-name) slot-value)))) (defmacro quote-nonselfeval (x) (once-only (x) |