ruby-changes:42756
From: akr <ko1@a...>
Date: Sat, 30 Apr 2016 11:34:18 +0900 (JST)
Subject: [ruby-changes:42756] akr:r54830 (trunk): Rename fix_rev and rb_big_neg to fix_comp and rb_big_comp.
akr 2016-04-30 12:30:53 +0900 (Sat, 30 Apr 2016) New Revision: 54830 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54830 Log: 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. Modified files: trunk/ChangeLog trunk/bignum.c trunk/internal.h trunk/numeric.c Index: ChangeLog =================================================================== --- ChangeLog (revision 54829) +++ ChangeLog (revision 54830) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Apr 30 12:28:59 2016 Tanaka Akira <akr@f...> + + * 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@f...> * numeric.c (int_comp): {Fixnum,Bignum}#~ is unified into Index: numeric.c =================================================================== --- numeric.c (revision 54829) +++ numeric.c (revision 54830) @@ -3870,7 +3870,7 @@ fix_le(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/numeric.c#L3870 */ static VALUE -fix_rev(VALUE num) +fix_comp(VALUE num) { return ~num | FIXNUM_FLAG; } @@ -3879,10 +3879,10 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/numeric.c#L3879 int_comp(VALUE num) { if (FIXNUM_P(num)) { - return fix_rev(num); + return fix_comp(num); } else if (RB_TYPE_P(num, T_BIGNUM)) { - return rb_big_neg(num); + return rb_big_comp(num); } return Qnil; } Index: internal.h =================================================================== --- internal.h (revision 54829) +++ internal.h (revision 54830) @@ -781,7 +781,7 @@ size_t rb_big_size(VALUE); https://github.com/ruby/ruby/blob/trunk/internal.h#L781 VALUE rb_integer_float_cmp(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_big_neg(VALUE x); +VALUE rb_big_comp(VALUE x); VALUE rb_big_aref(VALUE x, VALUE y); VALUE rb_big_abs(VALUE x); VALUE rb_big_size_m(VALUE big); Index: bignum.c =================================================================== --- bignum.c (revision 54829) +++ bignum.c (revision 54830) @@ -5547,7 +5547,7 @@ rb_big_uminus(VALUE x) https://github.com/ruby/ruby/blob/trunk/bignum.c#L5547 } VALUE -rb_big_neg(VALUE x) +rb_big_comp(VALUE x) { VALUE z = rb_big_clone(x); BDIGIT *ds = BDIGITS(z); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/