[前][次][番号順一覧][スレッド一覧]

ruby-changes:11435

From: akr <ko1@a...>
Date: Mon, 23 Mar 2009 22:02:36 +0900 (JST)
Subject: [ruby-changes:11435] Ruby:r23060 (trunk): * time.c (time_timespec): use NUM2TIMET.

akr	2009-03-23 22:02:12 +0900 (Mon, 23 Mar 2009)

  New Revision: 23060

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23060

  Log:
    * time.c (time_timespec): use NUM2TIMET.
      (time_s_at): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/time.c

Index: time.c
===================================================================
--- time.c	(revision 23059)
+++ time.c	(revision 23060)
@@ -192,7 +192,7 @@
 
     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 @@
 	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 @@
             }
             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 @@
     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 {
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 23059)
+++ ChangeLog	(revision 23060)
@@ -1,3 +1,8 @@
+Mon Mar 23 22:01:00 2009  Tanaka Akira  <akr@f...>
+
+	* time.c (time_timespec): use NUM2TIMET.
+	  (time_s_at): ditto.
+
 Mon Mar 23 21:52:26 2009  Akinori MUSHA  <knu@i...>
 
 	* process.c (Init_process): Better patch for eliminating an

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]