diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-02 22:34:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-02 22:34:44 +0000 |
commit | aa1141e16721e09d2ec468bcab0e545af52fbb4c (patch) | |
tree | 60b3d7f63a142743c1a6f6380af2dec3b5aca370 | |
parent | a4209572de70242c16e99d301f8de6e880ecb908 (diff) | |
download | ruby-aa1141e16721e09d2ec468bcab0e545af52fbb4c.tar.gz |
* ext/bigdecimal/bigdecimal.c (BigDecimal_hash): fix type warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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; } |