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

ruby-changes:30254

From: akr <ko1@a...>
Date: Thu, 1 Aug 2013 20:48:55 +0900 (JST)
Subject: [ruby-changes:30254] akr:r42306 (trunk): * bignum.c (power_cache_get_power): Hide cached Bignum objects.

akr	2013-08-01 20:48:42 +0900 (Thu, 01 Aug 2013)

  New Revision: 42306

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

  Log:
    * bignum.c (power_cache_get_power): Hide cached Bignum objects.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42305)
+++ ChangeLog	(revision 42306)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Aug  1 20:46:29 2013  Tanaka Akira  <akr@f...>
+
+	* bignum.c (power_cache_get_power): Hide cached Bignum objects.
+
 Thu Aug  1 19:15:05 2013  Tanaka Akira  <akr@f...>
 
 	* bignum.c (rb_big2str1): Remove non-trim mode.
Index: bignum.c
===================================================================
--- bignum.c	(revision 42305)
+++ bignum.c	(revision 42306)
@@ -4151,6 +4151,7 @@ power_cache_get_power(int base, int powe https://github.com/ruby/ruby/blob/trunk/bignum.c#L4151
             power = bigsq(power_cache_get_power(base, power_level - 1, &numdigits));
             numdigits *= 2;
         }
+        rb_obj_hide(power);
         big2str_power_cache[base - 2][power_level] = power;
         big2str_numdigits_cache[base - 2][power_level] = numdigits;
 	rb_gc_register_mark_object(power);

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

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