From 787be7f188f9c55a0ce051cfc49a84ea6ef22b9e Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sat, 26 Mar 2016 18:33:04 +0100 Subject: [PATCH] Review fixed source import. The clone method was missing specific slots of fixed-copy class. --- src/sources/fixed.lisp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/sources/fixed.lisp b/src/sources/fixed.lisp index 97f950e..88073ce 100644 --- a/src/sources/fixed.lisp +++ b/src/sources/fixed.lisp @@ -32,7 +32,15 @@ (defmethod clone-copy-for ((fixed copy-fixed) path-spec) "Create a copy of FIXED for loading data from PATH-SPEC." - (change-class (call-next-method fixed path-spec) 'copy-fixed)) + (let ((fixed-clone + (change-class (call-next-method fixed path-spec) 'copy-fixed))) + (loop :for slot-name :in '(encoding skip-lines) + :do (when (slot-boundp fixed slot-name) + (setf (slot-value fixed-clone slot-name) + (slot-value fixed slot-name)))) + + ;; return the new instance! + fixed-clone)) (declaim (inline parse-row))