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
This commit is contained in:
parent
9996945af9
commit
c05cfe3739
@ -1166,6 +1166,7 @@ VALUE rb_dbl_hash(double d);
|
|||||||
VALUE rb_fix_plus(VALUE x, VALUE y);
|
VALUE rb_fix_plus(VALUE x, VALUE y);
|
||||||
VALUE rb_int_ge(VALUE x, VALUE y);
|
VALUE rb_int_ge(VALUE x, VALUE y);
|
||||||
enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
|
enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
|
||||||
|
VALUE rb_int_fdiv(VALUE x, VALUE y);
|
||||||
|
|
||||||
#if USE_FLONUM
|
#if USE_FLONUM
|
||||||
#define RUBY_BIT_ROTL(v, n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n)))
|
#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
|
VALUE
|
||||||
int_fdiv(VALUE x, VALUE y)
|
rb_int_fdiv(VALUE x, VALUE y)
|
||||||
{
|
{
|
||||||
if (FIXNUM_P(x)) {
|
if (FIXNUM_P(x)) {
|
||||||
return fix_fdiv(x, y);
|
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, "modulo", rb_int_modulo, 1);
|
||||||
rb_define_method(rb_cInteger, "remainder", int_remainder, 1);
|
rb_define_method(rb_cInteger, "remainder", int_remainder, 1);
|
||||||
rb_define_method(rb_cInteger, "divmod", int_divmod, 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, "**", rb_int_pow, 1);
|
||||||
|
|
||||||
rb_define_method(rb_cInteger, "abs", int_abs, 0);
|
rb_define_method(rb_cInteger, "abs", int_abs, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user