summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-10 15:23:33 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-10 15:23:33 +0000
commitc05cfe37391e9fbe1d6825f893f9cd9c50403633 (patch)
tree25aa2972af254de25cbc01fbf3739ffe8d0c18f0
parent9996945af9eb575a5e7658f076cf90fd17fc3c90 (diff)
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.h1
-rw-r--r--numeric.c6
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)))
diff --git a/numeric.c b/numeric.c
index 6ab3593cfc..2986f98373 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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);