summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-30 12:00:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-30 12:00:31 +0000
commit0cf5d3fa963e084e80feac64977ca4c83afcbf22 (patch)
tree791d1c675bc243bc2e4c356a4de1a89967a9dce4 /time.c
parenta00c1c00c174a305a935a825f16511db29d8cf1a (diff)
fix previous commit for LP64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/time.c b/time.c
index bfc0e95083..c7c89c7142 100644
--- a/time.c
+++ b/time.c
@@ -619,7 +619,7 @@ rb_time_magnify(wideval_t w)
}
#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 @@ rb_time_magnify(wideval_t w)
}
#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 @@ rb_time_unmagnify(wideval_t w)
return WIDEVAL_WRAP(INT64toFIXWV(c));
}
}
-#endif
return wquo(w, WIDEVAL_WRAP(INT64toFIXWV(TIME_SCALE)));
+#else
+ return wquo(w, WIDEVAL_WRAP(INT2FIX(TIME_SCALE)));
+#endif
}
static VALUE