[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Strange hash-table behavior in compiled code
From: |
Mario Domenech Goulart |
Subject: |
[Chicken-users] Strange hash-table behavior in compiled code |
Date: |
Sun, 25 Sep 2005 14:38:50 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Hello
I'm confused about the behavior of hash tables in compiled code.
$ cat ht.scm
(let ((ht (make-hash-table string=?)))
(hash-table-set! ht "a" "b")
(print (hash-table-ref ht "a")))
$ csi -script ht.scm
b
$ csc -s ht.scm
$ csi -n
_______ _ __
/ ___/ / (_)___/ /_____ ___
/ /__/ _ \/ / __/ '_/ -_) _ \
\___/_//_/_/\__/_/\_\\__/_//_/
Version 2, Build 106 - linux-unix-gnu-unknown - [ dload ]
(c)2000-2005 Felix L. Winkelmann
#;1> (use ht)
; loading ./ht.so ...
#f
$ uname -a
Linux mandolate 2.6.11.7 #1 Sat Apr 9 21:34:07 GMT 2005 ppc 745/755
PowerBook4,1 GNU/Linux
I checked the behavior on an older Chicken version and got the expected
result:
$ csi -script ht.scm
b
$ csi
________ _ __
/ ____/ /_ (_)____/ /_____ ____
/ / / __ \/ / ___/ //_/ _ \/ __ \
/ /___/ / / / / /__/ ,< / __/ / / /
\____/_/ /_/_/\___/_/|_|\___/_/ /_/
Version 1, Build 63 - linux-unix-gnu-x86
(c)2000-2004 Felix L. Winkelmann
#;> (use ht)
; loading ./ht.so ...
b
$ uname -a
Linux azile 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686 GNU/Linux
Is there something I'm missing? If you need more information about the
environment, let me know.
Best wishes.
Mario
- [Chicken-users] Strange hash-table behavior in compiled code,
Mario Domenech Goulart <=