summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'time.c')
-rw-r--r--time.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/time.c b/time.c
index a459f56dc2..8869f3269d 100644
--- a/time.c
+++ b/time.c
@@ -87,7 +87,7 @@ cmp(VALUE x, VALUE y)
return 1;
return 0;
}
- if (RB_TYPE_P(x, T_BIGNUM)) return FIX2INT(rb_big_cmp(x, y));
+ if (RB_BIGNUM_TYPE_P(x)) return FIX2INT(rb_big_cmp(x, y));
return rb_cmpint(rb_funcall(x, idCmp, 1, y), x, y);
}
@@ -103,7 +103,7 @@ addv(VALUE x, VALUE y)
if (FIXNUM_P(x) && FIXNUM_P(y)) {
return LONG2NUM(FIX2LONG(x) + FIX2LONG(y));
}
- if (RB_TYPE_P(x, T_BIGNUM)) return rb_big_plus(x, y);
+ if (RB_BIGNUM_TYPE_P(x)) return rb_big_plus(x, y);
return rb_funcall(x, '+', 1, y);
}
@@ -113,7 +113,7 @@ subv(VALUE x, VALUE y)
if (FIXNUM_P(x) && FIXNUM_P(y)) {
return LONG2NUM(FIX2LONG(x) - FIX2LONG(y));
}
- if (RB_TYPE_P(x, T_BIGNUM)) return rb_big_minus(x, y);
+ if (RB_BIGNUM_TYPE_P(x)) return rb_big_minus(x, y);
return rb_funcall(x, '-', 1, y);
}
@@ -123,7 +123,7 @@ mulv(VALUE x, VALUE y)
if (FIXNUM_P(x) && FIXNUM_P(y)) {
return rb_fix_mul_fix(x, y);
}
- if (RB_TYPE_P(x, T_BIGNUM))
+ if (RB_BIGNUM_TYPE_P(x))
return rb_big_mul(x, y);
return rb_funcall(x, '*', 1, y);
}
@@ -134,7 +134,7 @@ divv(VALUE x, VALUE y)
if (FIXNUM_P(x) && FIXNUM_P(y)) {
return rb_fix_div_fix(x, y);
}
- if (RB_TYPE_P(x, T_BIGNUM))
+ if (RB_BIGNUM_TYPE_P(x))
return rb_big_div(x, y);
return rb_funcall(x, id_div, 1, y);
}
@@ -146,7 +146,7 @@ modv(VALUE x, VALUE y)
if (FIX2LONG(y) == 0) rb_num_zerodiv();
if (FIXNUM_P(x)) return rb_fix_mod_fix(x, y);
}
- if (RB_TYPE_P(x, T_BIGNUM)) return rb_big_modulo(x, y);
+ if (RB_BIGNUM_TYPE_P(x)) return rb_big_modulo(x, y);
return rb_funcall(x, '%', 1, y);
}
@@ -322,7 +322,7 @@ v2w(VALUE v)
if (FIXNUM_P(v)) {
return WIDEVAL_WRAP((WIDEVALUE)(SIGNED_WIDEVALUE)(long)v);
}
- else if (RB_TYPE_P(v, T_BIGNUM) &&
+ else if (RB_BIGNUM_TYPE_P(v) &&
rb_absint_size(v, NULL) <= sizeof(WIDEVALUE)) {
return v2w_bignum(v);
}
@@ -2575,7 +2575,7 @@ time_timespec(VALUE num, int interval)
}
}
}
- else if (RB_TYPE_P(num, T_BIGNUM)) {
+ else if (RB_BIGNUM_TYPE_P(num)) {
t.tv_sec = NUM2TIMET(num);
arg_range_check(t.tv_sec);
t.tv_nsec = 0;