summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-02 22:34:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-02 22:34:44 +0000
commitaa1141e16721e09d2ec468bcab0e545af52fbb4c (patch)
tree60b3d7f63a142743c1a6f6380af2dec3b5aca370 /ext
parenta4209572de70242c16e99d301f8de6e880ecb908 (diff)
* 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
Diffstat (limited to 'ext')
-rw-r--r--ext/bigdecimal/bigdecimal.c4
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;
}