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

ruby-changes:15232

From: akr <ko1@a...>
Date: Tue, 30 Mar 2010 21:00:47 +0900 (JST)
Subject: [ruby-changes:15232] Ruby:r27114 (trunk): fix previous commit for LP64.

akr	2010-03-30 21:00:31 +0900 (Tue, 30 Mar 2010)

  New Revision: 27114

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

  Log:
    fix previous commit for LP64.

  Modified files:
    trunk/time.c

Index: time.c
===================================================================
--- time.c	(revision 27113)
+++ time.c	(revision 27114)
@@ -619,7 +619,7 @@
         }
 #else
         long a, b, c;
-        a = FIX2LONG(v);
+        a = FIX2LONG(WIDEVAL_GET(w));
         if (a == 0) {
             return WIDEVAL_WRAP(INT2FIX(0));
 	}
@@ -630,7 +630,11 @@
         }
 #endif
     }
+#if WIDEVALUE_IS_WIDER
     return wmul(w, WIDEVAL_WRAP(INT64toFIXWV(TIME_SCALE)));
+#else
+    return wmul(w, WIDEVAL_WRAP(INT2FIX(TIME_SCALE)));
+#endif
 }
 
 static wideval_t
@@ -646,8 +650,10 @@
             return WIDEVAL_WRAP(INT64toFIXWV(c));
         }
     }
+    return wquo(w, WIDEVAL_WRAP(INT64toFIXWV(TIME_SCALE)));
+#else
+    return wquo(w, WIDEVAL_WRAP(INT2FIX(TIME_SCALE)));
 #endif
-    return wquo(w, WIDEVAL_WRAP(INT64toFIXWV(TIME_SCALE)));
 }
 
 static VALUE

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

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