Hash tables were not properly serialized.

This commit is contained in:
Juan Jose Garcia Ripoll 2008-12-06 10:49:08 +01:00
parent 8143e42705
commit cd24fc30d5
2 changed files with 5 additions and 1 deletions

View file

@ -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 ***

View file

@ -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)))))