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

ruby-changes:29128

From: akr <ko1@a...>
Date: Sat, 8 Jun 2013 22:32:22 +0900 (JST)
Subject: [ruby-changes:29128] akr:r41180 (trunk): * time.c (v2w): Use rb_absint_size instead of RBIGNUM_LEN.

akr	2013-06-08 22:31:35 +0900 (Sat, 08 Jun 2013)

  New Revision: 41180

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

  Log:
    * time.c (v2w): Use rb_absint_size instead of RBIGNUM_LEN.

  Modified files:
    trunk/ChangeLog
    trunk/time.c

Index: time.c
===================================================================
--- time.c	(revision 41179)
+++ time.c	(revision 41180)
@@ -326,7 +326,7 @@ v2w(VALUE v) https://github.com/ruby/ruby/blob/trunk/time.c#L326
         return WIDEVAL_WRAP((WIDEVALUE)(SIGNED_WIDEVALUE)(long)v);
     }
     else if (RB_TYPE_P(v, T_BIGNUM) &&
-        RBIGNUM_LEN(v) * sizeof(BDIGIT) <= sizeof(WIDEVALUE)) {
+        rb_absint_size(v, NULL) <= sizeof(WIDEVALUE)) {
         return v2w_bignum(v);
     }
 #endif
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41179)
+++ ChangeLog	(revision 41180)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jun  8 22:18:57 2013  Tanaka Akira  <akr@f...>
+
+	* time.c (v2w): Use rb_absint_size instead of RBIGNUM_LEN.
+
 Sat Jun  8 21:47:33 2013  Tanaka Akira  <akr@f...>
 
 	* time.c (v2w_bignum): Simplified using rb_integer_pack.

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

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