Rename fix_rev and rb_big_neg to fix_comp and rb_big_comp.
* bignum.c (rb_big_comp): Renamed from rb_big_neg. * numeric.c (fix_comp): Renamed from fix_rev. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
10fb4e151d
commit
d73b431e50
@ -1,3 +1,9 @@
|
|||||||
|
Sat Apr 30 12:28:59 2016 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* bignum.c (rb_big_comp): Renamed from rb_big_neg.
|
||||||
|
|
||||||
|
* numeric.c (fix_comp): Renamed from fix_rev.
|
||||||
|
|
||||||
Sat Apr 30 12:25:43 2016 Tanaka Akira <akr@fsij.org>
|
Sat Apr 30 12:25:43 2016 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* numeric.c (int_comp): {Fixnum,Bignum}#~ is unified into
|
* numeric.c (int_comp): {Fixnum,Bignum}#~ is unified into
|
||||||
|
2
bignum.c
2
bignum.c
@ -5547,7 +5547,7 @@ rb_big_uminus(VALUE x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_big_neg(VALUE x)
|
rb_big_comp(VALUE x)
|
||||||
{
|
{
|
||||||
VALUE z = rb_big_clone(x);
|
VALUE z = rb_big_clone(x);
|
||||||
BDIGIT *ds = BDIGITS(z);
|
BDIGIT *ds = BDIGITS(z);
|
||||||
|
@ -781,7 +781,7 @@ size_t rb_big_size(VALUE);
|
|||||||
VALUE rb_integer_float_cmp(VALUE x, VALUE y);
|
VALUE rb_integer_float_cmp(VALUE x, VALUE y);
|
||||||
VALUE rb_integer_float_eq(VALUE x, VALUE y);
|
VALUE rb_integer_float_eq(VALUE x, VALUE y);
|
||||||
VALUE rb_cstr_parse_inum(const char *str, ssize_t len, char **endp, int base);
|
VALUE rb_cstr_parse_inum(const char *str, ssize_t len, char **endp, int base);
|
||||||
VALUE rb_big_neg(VALUE x);
|
VALUE rb_big_comp(VALUE x);
|
||||||
VALUE rb_big_aref(VALUE x, VALUE y);
|
VALUE rb_big_aref(VALUE x, VALUE y);
|
||||||
VALUE rb_big_abs(VALUE x);
|
VALUE rb_big_abs(VALUE x);
|
||||||
VALUE rb_big_size_m(VALUE big);
|
VALUE rb_big_size_m(VALUE big);
|
||||||
|
@ -3870,7 +3870,7 @@ fix_le(VALUE x, VALUE y)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
fix_rev(VALUE num)
|
fix_comp(VALUE num)
|
||||||
{
|
{
|
||||||
return ~num | FIXNUM_FLAG;
|
return ~num | FIXNUM_FLAG;
|
||||||
}
|
}
|
||||||
@ -3879,10 +3879,10 @@ static VALUE
|
|||||||
int_comp(VALUE num)
|
int_comp(VALUE num)
|
||||||
{
|
{
|
||||||
if (FIXNUM_P(num)) {
|
if (FIXNUM_P(num)) {
|
||||||
return fix_rev(num);
|
return fix_comp(num);
|
||||||
}
|
}
|
||||||
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
||||||
return rb_big_neg(num);
|
return rb_big_comp(num);
|
||||||
}
|
}
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user