diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-16 01:02:23 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-16 01:02:23 +0000 |
commit | 8eb121d8122394c275ba8fb9583b4584639c932a (patch) | |
tree | a77eabd1721bdceae9483eec2742c8893830d013 /ext | |
parent | 56d3b926ce01e79388c0e8caa29448b24dd21e06 (diff) |
* ext/bigdecimal/bigdecimal.h (llabs): never never never never never
use "long long".
* ext/bigdecimal.bigdecimal.c (BigDecimal_to_i): get rid of a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 2 | ||||
-rw-r--r-- | ext/bigdecimal/bigdecimal.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 007d742d17..c674c95e60 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -481,7 +481,7 @@ BigDecimal_to_i(VALUE self) if(e<=0) return INT2FIX(0); nf = VpBaseFig(); if(e<=nf) { - return LONG2NUM(VpGetSign(p)*(BDIGIT_DBL_SIGNED)p->frac[0]); + return LONG2NUM((long)(VpGetSign(p)*(BDIGIT_DBL_SIGNED)p->frac[0])); } else { VALUE a = BigDecimal_split(self); diff --git a/ext/bigdecimal/bigdecimal.h b/ext/bigdecimal/bigdecimal.h index d77371fe38..06b9a85c3a 100644 --- a/ext/bigdecimal/bigdecimal.h +++ b/ext/bigdecimal/bigdecimal.h @@ -33,8 +33,8 @@ labs(long const x) #endif #ifndef HAVE_LLABS -static inline long long -llabs(long long const x) +static inline LONG_LONG +llabs(LONG_LONG const x) { if (x < 0) return -x; return x; |