From d73b431e5068f2b5a2c696dca6d84a8c394602b1 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 30 Apr 2016 03:30:53 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ bignum.c | 2 +- internal.h | 2 +- numeric.c | 6 +++--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b380a63ba..b3cf2e4bcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Apr 30 12:28:59 2016 Tanaka Akira + + * 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 * numeric.c (int_comp): {Fixnum,Bignum}#~ is unified into diff --git a/bignum.c b/bignum.c index 77f44ad21a..6444deb1e8 100644 --- a/bignum.c +++ b/bignum.c @@ -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); diff --git a/numeric.c b/numeric.c index 6cd0d45879..5201db10fd 100644 --- a/numeric.c +++ b/numeric.c @@ -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; }