diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-04-08 16:06:30 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-04-08 16:28:38 +0900 |
commit | d8720eb7de9cd9d874b621f214c27022e17cc941 (patch) | |
tree | a0a448d47f614493d8a6bb9aabaca9a7cf9870e7 /ext/bigdecimal/bigdecimal.c | |
parent | 6163a4e1b33ed7df27d0c37e835ce04407857a16 (diff) |
Suppress -Wshorten-64-to-32 warnings
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 7ac883730d..ecd43fdc5c 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -343,8 +343,8 @@ BigDecimal_prec(VALUE self) VALUE obj; GUARD_OBJ(p, GetVpValue(self, 1)); - obj = rb_assoc_new(INT2NUM(p->Prec*VpBaseFig()), - INT2NUM(p->MaxPrec*VpBaseFig())); + obj = rb_assoc_new(SIZET2NUM(p->Prec*VpBaseFig()), + SIZET2NUM(p->MaxPrec*VpBaseFig())); return obj; } @@ -2132,7 +2132,7 @@ BigDecimal_split(VALUE self) rb_ary_push(obj, str); rb_str_resize(str, strlen(psz1)); rb_ary_push(obj, INT2FIX(10)); - rb_ary_push(obj, INT2NUM(e)); + rb_ary_push(obj, SSIZET2NUM(e)); return obj; } @@ -2145,7 +2145,7 @@ static VALUE BigDecimal_exponent(VALUE self) { ssize_t e = VpExponent10(GetVpValue(self, 1)); - return INT2NUM(e); + return SSIZET2NUM(e); } /* Returns a string representation of self. @@ -2765,7 +2765,7 @@ static VALUE BigDecimal_limit(int argc, VALUE *argv, VALUE self) { VALUE nFig; - VALUE nCur = INT2NUM(VpGetPrecLimit()); + VALUE nCur = SIZET2NUM(VpGetPrecLimit()); if (rb_scan_args(argc, argv, "01", &nFig) == 1) { int nf; |