Declare copy functions for structures

(Olof-Joachim Frahm)
parent b177b15a
...@@ -431,12 +431,15 @@ ...@@ -431,12 +431,15 @@
(defun define-copier () (defun define-copier ()
(when *dd-copier* (when *dd-copier*
(cond ((eq *dd-type* 'list) (cond ((eq *dd-type* 'list)
`((setf (fdefinition ',*dd-copier*) #'copy-list))) `((declaim (ftype (function (list) list) ,*dd-copier*))
(setf (fdefinition ',*dd-copier*) #'copy-list)))
((or (eq *dd-type* 'vector) ((or (eq *dd-type* 'vector)
(and (consp *dd-type*) (eq (car *dd-type*) 'vector))) (and (consp *dd-type*) (eq (car *dd-type*) 'vector)))
`((setf (fdefinition ',*dd-copier*) #'copy-seq))) `((declaim (ftype (function (vector) vector) ,*dd-copier*))
(setf (fdefinition ',*dd-copier*) #'copy-seq)))
(t (t
`((setf (fdefinition ',*dd-copier*) #'copy-structure)))))) `((declaim (ftype (function (T) T) ,*dd-copier*))
(setf (fdefinition ',*dd-copier*) #'copy-structure))))))
(defun define-print-function () (defun define-print-function ()
(cond (*dd-print-function* (cond (*dd-print-function*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment