summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-19 01:11:04 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-19 01:11:04 (GMT)
commit95de2b001247b5e8ccd89d5ba7225d42aafec1e5 (patch)
treec41b3bbde5e8c505e54317a1df9152d1dc63deef /rational.c
parent8233f969a28e03bf7771424cf5a893369a14e5df (diff)
* internal.h (struct RBignum): Use size_t for len.
* include/ruby/intern.h (rb_big_new): Use size_t instead of long to specify the size of bignum. (rb_big_resize): Ditto. * bignum.c: Follow above changes. * rational.c: Follow above changes. * marshal.c: Follow above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rational.c b/rational.c
index 932fc53..60ff356 100644
--- a/rational.c
+++ b/rational.c
@@ -363,8 +363,8 @@ f_gcd(VALUE x, VALUE y)
{
#ifdef USE_GMP
if (RB_TYPE_P(x, T_BIGNUM) && RB_TYPE_P(y, T_BIGNUM)) {
- long xn = BIGNUM_LEN(x);
- long yn = BIGNUM_LEN(y);
+ size_t xn = BIGNUM_LEN(x);
+ size_t yn = BIGNUM_LEN(y);
if (GMP_GCD_DIGITS <= xn || GMP_GCD_DIGITS <= yn)
return rb_gcd_gmp(x, y);
}