From 95de2b001247b5e8ccd89d5ba7225d42aafec1e5 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 19 Apr 2014 01:11:04 +0000 Subject: * 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 --- rational.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rational.c') diff --git a/rational.c b/rational.c index 932fc53fbb..60ff356b22 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); } -- cgit v1.2.3