Repositories
/
ecl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8a4d98
)
_hash_equalp() did not contain a case for bignums.
author
Juanjo Garcia-Ripoll
<jjgarcia@users.sf.net>
Tue, 29 Oct 2013 22:47:54 +0000
(23:47 +0100)
committer
Juanjo Garcia-Ripoll
<jjgarcia@users.sf.net>
Tue, 29 Oct 2013 22:47:54 +0000
(23:47 +0100)
src/c/hash.d
patch
|
blob
|
blame
|
history
diff --git
a/src/c/hash.d
b/src/c/hash.d
index
bb68640
..
88b8427
100644
(file)
--- a/
src/c/hash.d
+++ b/
src/c/hash.d
@@
-193,6
+193,9
@@
_hash_equalp(int depth, cl_hashkey h, cl_object x)
return hash_word(h, (cl_index)ecl_double_float(x));
case t_bignum:
/* FIXME! We should be more precise here! */
+ return hash_string(h, (unsigned char*)x->big.big_num->_mp_d,
+ abs(x->big.big_num->_mp_size) *
+ sizeof(mp_limb_t));
case t_ratio:
h = _hash_equalp(0, h, x->ratio.num);
return _hash_equalp(0, h, x->ratio.den);