diff --git a/ChangeLog b/ChangeLog index 73f82e93df..9b682b0d3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Mar 23 22:01:00 2009 Tanaka Akira + + * time.c (time_timespec): use NUM2TIMET. + (time_s_at): ditto. + Mon Mar 23 21:52:26 2009 Akinori MUSHA * process.c (Init_process): Better patch for eliminating an diff --git a/time.c b/time.c index 59da26b0b1..588d4fafba 100644 --- a/time.c +++ b/time.c @@ -192,7 +192,7 @@ time_timespec(VALUE num, int interval) switch (TYPE(num)) { case T_FIXNUM: - t.tv_sec = FIX2LONG(num); + t.tv_sec = NUM2TIMET(num); if (interval && t.tv_sec < 0) rb_raise(rb_eArgError, "%s must be positive", tstr); t.tv_nsec = 0; @@ -218,7 +218,7 @@ time_timespec(VALUE num, int interval) break; case T_BIGNUM: - t.tv_sec = NUM2LONG(num); + t.tv_sec = NUM2TIMET(num); if (interval && t.tv_sec < 0) rb_raise(rb_eArgError, "%s must be positive", tstr); t.tv_nsec = 0; @@ -232,7 +232,7 @@ time_timespec(VALUE num, int interval) } i = rb_ary_entry(ary, 0); f = rb_ary_entry(ary, 1); - t.tv_sec = NUM2LONG(i); + t.tv_sec = NUM2TIMET(i); if (interval && t.tv_sec < 0) rb_raise(rb_eArgError, "%s must be positive", tstr); f = rb_funcall(f, id_mul, 1, INT2FIX(1000000000)); @@ -324,7 +324,7 @@ time_s_at(int argc, VALUE *argv, VALUE klass) VALUE time, t; if (rb_scan_args(argc, argv, "11", &time, &t) == 2) { - ts.tv_sec = NUM2LONG(time); + ts.tv_sec = NUM2TIMET(time); ts.tv_nsec = NUM2LONG(rb_funcall(t, id_mul, 1, INT2FIX(1000))); } else {