mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
a4209572de
commit
aa1141e167
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue