From d77e8a7da596fc23acd76c785548f6314114f97a Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 20 Feb 2018 08:01:44 +0000 Subject: Signature of rb_uint2big and rb_int2big * include/ruby/ruby.h (rb_uint2big, rb_int2big): declare with uintptr_t and intptr_t instead of VALUE and SIGNED_VALUE respectively. [ruby-core:83424] [Bug #14036] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bignum.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bignum.c') 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; -- cgit v1.2.3