mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
77 lines
1.9 KiB
Diff
77 lines
1.9 KiB
Diff
From 6a05adeb927f02400f071962846bb3a83619bcbf Mon Sep 17 00:00:00 2001
|
|
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
Date: Mon, 14 Jan 2019 21:33:21 -0700
|
|
Subject: [PATCH 1/3] Revert "Signature of rb_uint2big and rb_int2big"
|
|
|
|
This reverts commit d77e8a7da596fc23acd76c785548f6314114f97a.
|
|
---
|
|
bignum.c | 10 +++++-----
|
|
include/ruby/ruby.h | 4 ++--
|
|
2 files changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/bignum.c b/bignum.c
|
|
index ee3b49fd04..2f9e8cd323 100644
|
|
--- a/bignum.c
|
|
+++ b/bignum.c
|
|
@@ -3154,7 +3154,7 @@ rb_big_norm(VALUE x)
|
|
}
|
|
|
|
VALUE
|
|
-rb_uint2big(uintptr_t n)
|
|
+rb_uint2big(VALUE n)
|
|
{
|
|
long i;
|
|
VALUE big = bignew(bdigit_roomof(SIZEOF_VALUE), 1);
|
|
@@ -3176,7 +3176,7 @@ rb_uint2big(uintptr_t n)
|
|
}
|
|
|
|
VALUE
|
|
-rb_int2big(intptr_t n)
|
|
+rb_int2big(SIGNED_VALUE n)
|
|
{
|
|
long neg = 0;
|
|
VALUE u;
|
|
@@ -3197,14 +3197,14 @@ rb_int2big(intptr_t n)
|
|
}
|
|
|
|
VALUE
|
|
-rb_uint2inum(uintptr_t n)
|
|
+rb_uint2inum(VALUE n)
|
|
{
|
|
if (POSFIXABLE(n)) return LONG2FIX(n);
|
|
return rb_uint2big(n);
|
|
}
|
|
|
|
VALUE
|
|
-rb_int2inum(intptr_t n)
|
|
+rb_int2inum(SIGNED_VALUE n)
|
|
{
|
|
if (FIXABLE(n)) return LONG2FIX(n);
|
|
return rb_int2big(n);
|
|
@@ -5963,7 +5963,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((uintptr_t)dd);
|
|
+ *modp = rb_uint2big((VALUE)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 d983114e0a..697ea7f45d 100644
|
|
--- a/include/ruby/ruby.h
|
|
+++ b/include/ruby/ruby.h
|
|
@@ -772,8 +772,8 @@ rb_num2ll_inline(VALUE x)
|
|
double rb_num2dbl(VALUE);
|
|
#define NUM2DBL(x) rb_num2dbl((VALUE)(x))
|
|
|
|
-VALUE rb_uint2big(uintptr_t);
|
|
-VALUE rb_int2big(intptr_t);
|
|
+VALUE rb_uint2big(VALUE);
|
|
+VALUE rb_int2big(SIGNED_VALUE);
|
|
|
|
VALUE rb_newobj(void);
|
|
VALUE rb_newobj_of(VALUE, VALUE);
|
|
--
|
|
2.20.1
|
|
|