summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-16 01:02:23 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-16 01:02:23 +0000
commit8eb121d8122394c275ba8fb9583b4584639c932a (patch)
treea77eabd1721bdceae9483eec2742c8893830d013 /ext/bigdecimal
parent56d3b926ce01e79388c0e8caa29448b24dd21e06 (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/bigdecimal')
-rw-r--r--ext/bigdecimal/bigdecimal.c2
-rw-r--r--ext/bigdecimal/bigdecimal.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 007d742d17c..c674c95e608 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 d77371fe384..06b9a85c3a6 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;