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

ruby-changes:29144

From: akr <ko1@a...>
Date: Sun, 9 Jun 2013 16:53:32 +0900 (JST)
Subject: [ruby-changes:29144] akr:r41196 (trunk): * bignum.c (rb_absint_numwords): Renamed from rb_absint_size_in_word.

akr	2013-06-09 16:53:20 +0900 (Sun, 09 Jun 2013)

  New Revision: 41196

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

  Log:
    * bignum.c (rb_absint_numwords): Renamed from rb_absint_size_in_word.
    
    * internal.h (rb_absint_numwords): Follow the above change.
    
    * pack.c (pack_pack): Ditto.
    
    * random.c (rand_init): Ditto.
      (limited_big_rand): Ditto.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c
    trunk/internal.h
    trunk/pack.c
    trunk/random.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41195)
+++ ChangeLog	(revision 41196)
@@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jun  9 16:51:41 2013  Tanaka Akira  <akr@f...>
+
+	* bignum.c (rb_absint_numwords): Renamed from rb_absint_size_in_word.
+
+	* internal.h (rb_absint_numwords): Follow the above change.
+
+	* pack.c (pack_pack): Ditto.
+
+	* random.c (rand_init): Ditto.
+	  (limited_big_rand): Ditto.
+
 Sun Jun  9 14:41:05 2013  Tanaka Akira  <akr@f...>
 
 	* bignum.c (rb_integer_pack): numwords_allocated argument removed.
Index: pack.c
===================================================================
--- pack.c	(revision 41195)
+++ pack.c	(revision 41196)
@@ -1018,7 +1018,7 @@ pack_pack(VALUE ary, VALUE fmt) https://github.com/ruby/ruby/blob/trunk/pack.c#L1018
 
 		from = NEXTFROM;
                 from = rb_to_int(from);
-                numbytes = rb_absint_size_in_word(from, 7, NULL);
+                numbytes = rb_absint_numwords(from, 7, NULL);
                 if (numbytes == 0)
                     numbytes = 1;
                 buf = rb_str_new(NULL, numbytes);
Index: internal.h
===================================================================
--- internal.h	(revision 41195)
+++ internal.h	(revision 41196)
@@ -120,7 +120,7 @@ VALUE rb_big_uminus(VALUE x); https://github.com/ruby/ruby/blob/trunk/internal.h#L120
 VALUE rb_integer_float_cmp(VALUE x, VALUE y);
 VALUE rb_integer_float_eq(VALUE x, VALUE y);
 size_t rb_absint_size(VALUE val, int *number_of_leading_zero_bits);
-size_t rb_absint_size_in_word(VALUE val, size_t word_numbits, size_t *number_of_leading_zero_bits);
+size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *number_of_leading_zero_bits);
 int rb_absint_singlebit_p(VALUE val);
 
 /* class.c */
Index: bignum.c
===================================================================
--- bignum.c	(revision 41195)
+++ bignum.c	(revision 41196)
@@ -500,7 +500,7 @@ rb_absint_size(VALUE val, int *number_of https://github.com/ruby/ruby/blob/trunk/bignum.c#L500
 }
 
 size_t
-rb_absint_size_in_word(VALUE val, size_t word_numbits_arg, size_t *number_of_leading_zero_bits)
+rb_absint_numwords(VALUE val, size_t word_numbits_arg, size_t *number_of_leading_zero_bits)
 {
     size_t numbytes;
     size_t numwords;
@@ -1662,7 +1662,7 @@ big2str_base_powerof2(VALUE x, size_t le https://github.com/ruby/ruby/blob/trunk/bignum.c#L1662
     size_t numwords;
     VALUE result;
     char *ptr;
-    numwords = trim ? rb_absint_size_in_word(x, word_numbits, NULL) : len;
+    numwords = trim ? rb_absint_numwords(x, word_numbits, NULL) : len;
     if (RBIGNUM_NEGATIVE_P(x) || !trim) {
         if (LONG_MAX-1 < numwords)
             rb_raise(rb_eArgError, "too big number");
Index: random.c
===================================================================
--- random.c	(revision 41195)
+++ random.c	(revision 41196)
@@ -375,7 +375,7 @@ rand_init(struct MT *mt, VALUE vseed) https://github.com/ruby/ruby/blob/trunk/random.c#L375
 
     seed = rb_to_int(vseed);
 
-    len = rb_absint_size_in_word(seed, 32, NULL);
+    len = rb_absint_numwords(seed, 32, NULL);
     if (MT_MAX_STATE < len)
         len = MT_MAX_STATE;
     if (len > numberof(buf0))
@@ -750,7 +750,7 @@ limited_big_rand(struct MT *mt, VALUE li https://github.com/ruby/ruby/blob/trunk/random.c#L750
     VALUE vtmp;
     VALUE val;
 
-    len = rb_absint_size_in_word(limit, 32, NULL);
+    len = rb_absint_numwords(limit, 32, NULL);
     tmp = ALLOCV_N(uint32_t, vtmp, len*2);
     lim_array = tmp;
     rnd_array = tmp + len;

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

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