From cd24fc30d501f35dee94c1feafa9ed4f90ebd233 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sat, 6 Dec 2008 10:49:08 +0100 Subject: [PATCH] Hash tables were not properly serialized. --- src/CHANGELOG | 2 ++ src/clos/print.lsp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CHANGELOG b/src/CHANGELOG index 03fb61f1d..eba44c786 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -196,6 +196,8 @@ ECL 8.9.0: (...) ...) This is now solved by replacing parts of these types with the simple type FUNCTION. + - Hash tables were not properly serialized. + ;;; Local Variables: *** ;;; mode:text *** ;;; fill-column:79 *** diff --git a/src/clos/print.lsp b/src/clos/print.lsp index bd4913926..a20c90c33 100644 --- a/src/clos/print.lsp +++ b/src/clos/print.lsp @@ -104,7 +104,9 @@ printer and we should rather use MAKE-LOAD-FORM." :rehash-size ,(hash-table-rehash-size object) :rehash-threshold ,(hash-table-rehash-threshold object) :test ',(hash-table-test object)) - `(dolist (i ,(maphash (lambda (key obj) (cons key obj)) object)) + `(dolist (i ',(loop for key being each hash-key in object + using (hash-value obj) + collect (cons key obj))) (setf (gethash (car i) ,object) (cdr i))))) (t (error "Cannot externalize object ~a" object)))))