chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] s11n among different chicken versions


From: felix winkelmann
Subject: Re: [Chicken-users] s11n among different chicken versions
Date: Mon, 7 Aug 2006 09:03:31 +0200

On 8/3/06, Daishi Kato <address@hidden> wrote:
Now, I can reproduce the problem.

% cat dump.scm
(use s11n)
(define x (make-hash-table))
(hash-table-set! x 'aaa (make-hash-table))
(hash-table-set! x 'bbb (make-hash-table))
(with-output-to-file "dump"
  (lambda ()
    (serialize x)))
% cat undump.scm
(use s11n)
(define (deserialize-fallback id)
  (cond ((string=? id "f_3497library.scm") ; chicken-2.315
         equal?)
        ((string=? id "f_6914extras.scm") ; chicken-2.315
         hash)
        (else
         (error "deserialize-fallback unknown id" id))))
(with-input-from-file "dump"
  (lambda ()
    (deserialize (current-input-port) deserialize-fallback)))
% /usr/local/chicken-2.315/bin/csi -q -s dump.scm
% /usr/local/chicken-2.41/bin/csi -q -s undump.scm
Error: (for-each) argument is not a proper list: ((aaa .
#<hash-table>) . #<procedure (hash x1094 . g10931095)>)

        Call history:

        <eval>          (##sys#require (quote s11n))
        <eval>          (with-input-from-file "dump" (lambda ()
(deserialize (current-input-port) deserialize-fallback)))
        <eval>          (deserialize (current-input-port) deserialize-fallback)
        <eval>          (current-input-port)
        <eval>          [deserialize-fallback] (string=? id "f_3497library.scm")
        <eval>          [deserialize-fallback] (string=? id "f_3497library.scm")
        <eval>          [deserialize-fallback] (string=? id
"f_6914extras.scm")<--

I can't say much about this problem. As I already said, the procedure-IDs
might be re-used, so this approach is definitely not safe.


cheers,
felix


--
http://galinha.ucpel.tche.br:8081/blog/blog.ssp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]