diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-10 15:23:33 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-10 15:23:33 +0000 |
commit | 2ba6ab451407300a924ab5dc2e0f54f608e7d4aa (patch) | |
tree | 25aa2972af254de25cbc01fbf3739ffe8d0c18f0 | |
parent | dfba8d429611cb8863351a2ec8d8dc049a08c2df (diff) | |
download | ruby-2ba6ab451407300a924ab5dc2e0f54f608e7d4aa.tar.gz |
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().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | internal.h | 1 | ||||
-rw-r--r-- | numeric.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/internal.h b/internal.h index 83883daf46..e435ed0a3c 100644 --- a/internal.h +++ b/internal.h @@ -1166,6 +1166,7 @@ VALUE rb_dbl_hash(double d); 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))) @@ -3583,8 +3583,8 @@ fix_fdiv(VALUE x, VALUE y) } } -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) 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); |