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

ruby-changes:42089

From: mrkn <ko1@a...>
Date: Fri, 18 Mar 2016 02:07:34 +0900 (JST)
Subject: [ruby-changes:42089] mrkn:r54163 (trunk): * bignum.c (rb_big_even_p, rb_big_odd_p): make them public functions

mrkn	2016-03-18 02:07:29 +0900 (Fri, 18 Mar 2016)

  New Revision: 54163

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54163

  Log:
    * bignum.c (rb_big_even_p, rb_big_odd_p): make them public functions
      to be available in other source files.
    
    * include/ruby/intern.h (rb_big_even_p, rb_big_odd_p): add prototype
      declarations.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c
    trunk/include/ruby/intern.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54162)
+++ ChangeLog	(revision 54163)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Mar 18 01:51:00 2016  Kenta Murata  <mrkn@m...>
+
+	* bignum.c (rb_big_even_p, rb_big_odd_p): make them public functions
+	  to be available in other source files.
+
+	* include/ruby/intern.h (rb_big_even_p, rb_big_odd_p): add prototype
+	  declarations.
+
 Fri Mar 18 00:25:56 2016  Tanaka Akira  <akr@f...>
 
 	* enum.c (ary_inject_op): Implement the specialized code for sum of
Index: bignum.c
===================================================================
--- bignum.c	(revision 54162)
+++ bignum.c	(revision 54163)
@@ -7006,7 +7006,7 @@ rb_big_bit_length(VALUE big) https://github.com/ruby/ruby/blob/trunk/bignum.c#L7006
  *  Returns <code>true</code> if <i>big</i> is an odd number.
  */
 
-static VALUE
+VALUE
 rb_big_odd_p(VALUE num)
 {
     if (BIGNUM_LEN(num) != 0 && BDIGITS(num)[0] & 1) {
@@ -7022,7 +7022,7 @@ rb_big_odd_p(VALUE num) https://github.com/ruby/ruby/blob/trunk/bignum.c#L7022
  *  Returns <code>true</code> if <i>big</i> is an even number.
  */
 
-static VALUE
+VALUE
 rb_big_even_p(VALUE num)
 {
     if (BIGNUM_LEN(num) != 0 && BDIGITS(num)[0] & 1) {
Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h	(revision 54162)
+++ include/ruby/intern.h	(revision 54163)
@@ -131,6 +131,8 @@ VALUE rb_big_or(VALUE, VALUE); https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L131
 VALUE rb_big_xor(VALUE, VALUE);
 VALUE rb_big_lshift(VALUE, VALUE);
 VALUE rb_big_rshift(VALUE, VALUE);
+VALUE rb_big_odd_p(VALUE);
+VALUE rb_big_even_p(VALUE);
 
 /* For rb_integer_pack and rb_integer_unpack: */
 /* "MS" in MSWORD and MSBYTE means "most significant" */

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

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