ruby-changes:43572
From: nobu <ko1@a...>
Date: Tue, 12 Jul 2016 22:17:08 +0900 (JST)
Subject: [ruby-changes:43572] nobu:r55645 (trunk): complex.c: rb_complex prefix
nobu 2016-07-12 22:17:04 +0900 (Tue, 12 Jul 2016) New Revision: 55645 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55645 Log: complex.c: rb_complex prefix * complex.c (rb_complex_plus, rb_complex_mul): rename to rb_complex prefix. Modified files: trunk/complex.c trunk/internal.h trunk/numeric.c Index: complex.c =================================================================== --- complex.c (revision 55644) +++ complex.c (revision 55645) @@ -715,11 +715,11 @@ f_addsub(VALUE self, VALUE other, https://github.com/ruby/ruby/blob/trunk/complex.c#L715 * Complex(20, 9) + 9.8 #=> (29.8+9i) */ VALUE -rb_nucomp_add(VALUE self, VALUE other) +rb_complex_plus(VALUE self, VALUE other) { return f_addsub(self, other, f_add, '+'); } -#define nucomp_add rb_nucomp_add +#define nucomp_add rb_complex_plus /* * call-seq: @@ -765,7 +765,7 @@ safe_mul(VALUE a, VALUE b, int az, int b https://github.com/ruby/ruby/blob/trunk/complex.c#L765 * Complex(20, 9) * 9.8 #=> (196.0+88.2i) */ VALUE -rb_nucomp_mul(VALUE self, VALUE other) +rb_complex_mul(VALUE self, VALUE other) { if (k_complex_p(other)) { VALUE real, imag; @@ -794,7 +794,7 @@ rb_nucomp_mul(VALUE self, VALUE other) https://github.com/ruby/ruby/blob/trunk/complex.c#L794 } return rb_num_coerce_bin(self, other, '*'); } -#define nucomp_mul rb_nucomp_mul +#define nucomp_mul rb_complex_mul inline static VALUE f_divide(VALUE self, VALUE other, Index: internal.h =================================================================== --- internal.h (revision 55644) +++ internal.h (revision 55645) @@ -901,8 +901,8 @@ CONSTFUNC(const char * rb_insns_name(int https://github.com/ruby/ruby/blob/trunk/internal.h#L901 VALUE rb_insns_name_array(void); /* complex.c */ -VALUE rb_nucomp_add(VALUE, VALUE); -VALUE rb_nucomp_mul(VALUE, VALUE); +VALUE rb_complex_plus(VALUE, VALUE); +VALUE rb_complex_mul(VALUE, VALUE); /* cont.c */ VALUE rb_obj_is_fiber(VALUE); Index: numeric.c =================================================================== --- numeric.c (revision 55644) +++ numeric.c (revision 55645) @@ -3240,7 +3240,7 @@ fix_plus(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/numeric.c#L3240 return DBL2NUM((double)FIX2LONG(x) + RFLOAT_VALUE(y)); } else if (RB_TYPE_P(y, T_COMPLEX)) { - return rb_nucomp_add(y, x); + return rb_complex_plus(y, x); } else { return rb_num_coerce_bin(x, y, '+'); @@ -3342,7 +3342,7 @@ fix_mul(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/numeric.c#L3342 return DBL2NUM((double)FIX2LONG(x) * RFLOAT_VALUE(y)); } else if (RB_TYPE_P(y, T_COMPLEX)) { - return rb_nucomp_mul(y, x); + return rb_complex_mul(y, x); } else { return rb_num_coerce_bin(x, y, '*'); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/