diff --git a/bignum.c b/bignum.c index 9e73927e69..f806558b97 100644 --- a/bignum.c +++ b/bignum.c @@ -3144,7 +3144,7 @@ rb_big_norm(VALUE x) } VALUE -rb_uint2big(VALUE n) +rb_uint2big(uintptr_t n) { long i; VALUE big = bignew(bdigit_roomof(SIZEOF_VALUE), 1); @@ -3166,7 +3166,7 @@ rb_uint2big(VALUE n) } VALUE -rb_int2big(SIGNED_VALUE n) +rb_int2big(intptr_t n) { long neg = 0; VALUE u; @@ -3187,14 +3187,14 @@ rb_int2big(SIGNED_VALUE n) } VALUE -rb_uint2inum(VALUE n) +rb_uint2inum(uintptr_t n) { if (POSFIXABLE(n)) return LONG2FIX(n); return rb_uint2big(n); } VALUE -rb_int2inum(SIGNED_VALUE n) +rb_int2inum(intptr_t n) { if (FIXABLE(n)) return LONG2FIX(n); return rb_int2big(n); @@ -5933,7 +5933,7 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp) zds = BDIGITS(z); dd = bigdivrem_single(zds, xds, xn, dd); if (modp) { - *modp = rb_uint2big((VALUE)dd); + *modp = rb_uint2big((uintptr_t)dd); BIGNUM_SET_SIGN(*modp, BIGNUM_SIGN(x)); } if (divp) *divp = z; diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 6578ffe66d..74c87e9709 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -747,8 +747,8 @@ rb_num2ll_inline(VALUE x) double rb_num2dbl(VALUE); #define NUM2DBL(x) rb_num2dbl((VALUE)(x)) -VALUE rb_uint2big(VALUE); -VALUE rb_int2big(SIGNED_VALUE); +VALUE rb_uint2big(uintptr_t); +VALUE rb_int2big(intptr_t); VALUE rb_newobj(void); VALUE rb_newobj_of(VALUE, VALUE);