ruby-changes:16843
From: nobu <ko1@a...>
Date: Tue, 3 Aug 2010 07:40:38 +0900 (JST)
Subject: [ruby-changes:16843] Ruby:r28838 (trunk): * ext/bigdecimal/bigdecimal.c (BigDecimal_hash): fix type warnings.
nobu 2010-08-03 07:34:44 +0900 (Tue, 03 Aug 2010) New Revision: 28838 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28838 Log: * ext/bigdecimal/bigdecimal.c (BigDecimal_hash): fix type warnings. Modified files: trunk/ext/bigdecimal/bigdecimal.c Index: ext/bigdecimal/bigdecimal.c =================================================================== --- ext/bigdecimal/bigdecimal.c (revision 28837) +++ ext/bigdecimal/bigdecimal.c (revision 28838) @@ -223,12 +223,12 @@ { 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; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/