From 0cf5d3fa963e084e80feac64977ca4c83afcbf22 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 30 Mar 2010 12:00:31 +0000 Subject: [PATCH] fix previous commit for LP64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- time.c | 10 ++++++++-- 1 file 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