diff options
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 239fe05a76..2afe3f796d 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -223,12 +223,12 @@ BigDecimal_hash(VALUE self) { ENTER(1); Real *p; - U_LONG hash,i; + st_index_t hash; GUARD_OBJ(p,GetVpValue(self,1)); hash = (U_LONG)p->sign; /* hash!=2: the case for 0(1),NaN(0) or +-Infinity(3) is sign itself */ - if(hash == 2 || hash == -2) { + if(hash == 2 || hash == (st_index_t)-2) { hash ^= rb_memhash(p->frac, sizeof(U_LONG)*p->Prec); hash += p->exponent; } |