ruby-changes:44623
From: mrkn <ko1@a...>
Date: Fri, 11 Nov 2016 00:23:40 +0900 (JST)
Subject: [ruby-changes:44623] mrkn:r56695 (trunk): numeric.c, internal.h: export int_fdiv() as rb_int_fdiv()
mrkn 2016-11-11 00:23:33 +0900 (Fri, 11 Nov 2016) New Revision: 56695 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56695 Log: numeric.c, internal.h: export int_fdiv() as rb_int_fdiv() * numeric.c (rb_int_fdiv): export int_fdiv() as rb_int_fdiv(). * internal.h (rb_int_fdiv): add declaration of rb_int_fdiv(). Modified files: trunk/internal.h trunk/numeric.c Index: numeric.c =================================================================== --- numeric.c (revision 56694) +++ numeric.c (revision 56695) @@ -3583,8 +3583,8 @@ fix_fdiv(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/numeric.c#L3583 } } -static VALUE -int_fdiv(VALUE x, VALUE y) +VALUE +rb_int_fdiv(VALUE x, VALUE y) { if (FIXNUM_P(x)) { return fix_fdiv(x, y); @@ -5243,7 +5243,7 @@ Init_Numeric(void) https://github.com/ruby/ruby/blob/trunk/numeric.c#L5243 rb_define_method(rb_cInteger, "modulo", rb_int_modulo, 1); rb_define_method(rb_cInteger, "remainder", int_remainder, 1); rb_define_method(rb_cInteger, "divmod", int_divmod, 1); - rb_define_method(rb_cInteger, "fdiv", int_fdiv, 1); + rb_define_method(rb_cInteger, "fdiv", rb_int_fdiv, 1); rb_define_method(rb_cInteger, "**", rb_int_pow, 1); rb_define_method(rb_cInteger, "abs", int_abs, 0); Index: internal.h =================================================================== --- internal.h (revision 56694) +++ internal.h (revision 56695) @@ -1166,6 +1166,7 @@ VALUE rb_dbl_hash(double d); https://github.com/ruby/ruby/blob/trunk/internal.h#L1166 VALUE rb_fix_plus(VALUE x, VALUE y); VALUE rb_int_ge(VALUE x, VALUE y); enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts); +VALUE rb_int_fdiv(VALUE x, VALUE y); #if USE_FLONUM #define RUBY_BIT_ROTL(v, n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n))) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/