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

ruby-changes:30152

From: akr <ko1@a...>
Date: Sun, 28 Jul 2013 00:39:11 +0900 (JST)
Subject: [ruby-changes:30152] akr:r42204 (trunk): * bignum.c (rb_big_size): Return the bignum "bytewise" size.

akr	2013-07-28 00:39:01 +0900 (Sun, 28 Jul 2013)

  New Revision: 42204

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

  Log:
    * bignum.c (rb_big_size): Return the bignum "bytewise" size.
      [ruby-core:55578] [Feature #8553]
      This is accepted by matz on DevelopersMeeting20130727Japan.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42203)
+++ ChangeLog	(revision 42204)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jul 28 00:35:14 2013  Tanaka Akira  <akr@f...>
+
+	* bignum.c (rb_big_size): Return the bignum "bytewise" size.
+	  [ruby-core:55578] [Feature #8553]
+	  This is accepted by matz on DevelopersMeeting20130727Japan.
+
 Sun Jul 28 00:07:48 2013  Tanaka Akira  <akr@f...>
 
 	* include/ruby/intern.h (rb_integer_pack): Declaration moved from
Index: bignum.c
===================================================================
--- bignum.c	(revision 42203)
+++ bignum.c	(revision 42204)
@@ -6284,7 +6284,7 @@ rb_big_abs(VALUE x) https://github.com/ruby/ruby/blob/trunk/bignum.c#L6284
 static VALUE
 rb_big_size(VALUE big)
 {
-    return LONG2FIX(RBIGNUM_LEN(big)*SIZEOF_BDIGITS);
+    return SIZET2NUM(BIGSIZE(big));
 }
 
 /*

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

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