diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-30 03:30:53 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-30 03:30:53 +0000 |
commit | d73b431e5068f2b5a2c696dca6d84a8c394602b1 (patch) | |
tree | 87ff847b4145727e7d17f1b0a39032c40bf0cd86 | |
parent | 10fb4e151d4b053c1adf2363b278ec37a49497da (diff) | |
download | ruby-d73b431e5068f2b5a2c696dca6d84a8c394602b1.tar.gz |
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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | bignum.c | 2 | ||||
-rw-r--r-- | internal.h | 2 | ||||
-rw-r--r-- | numeric.c | 6 |
4 files changed, 11 insertions, 5 deletions
@@ -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> * numeric.c (int_comp): {Fixnum,Bignum}#~ is unified into @@ -5547,7 +5547,7 @@ rb_big_uminus(VALUE x) } VALUE -rb_big_neg(VALUE x) +rb_big_comp(VALUE x) { VALUE z = rb_big_clone(x); BDIGIT *ds = BDIGITS(z); diff --git a/internal.h b/internal.h index bd2de89400..584742e596 100644 --- a/internal.h +++ b/internal.h @@ -781,7 +781,7 @@ size_t rb_big_size(VALUE); 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); @@ -3870,7 +3870,7 @@ fix_le(VALUE x, VALUE y) */ static VALUE -fix_rev(VALUE num) +fix_comp(VALUE num) { return ~num | FIXNUM_FLAG; } @@ -3879,10 +3879,10 @@ static VALUE 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; } |