mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
87234557eb
commit
d77e8a7da5
2 changed files with 7 additions and 7 deletions
10
bignum.c
10
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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue