summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-12 13:17:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-12 13:17:04 +0000
commit89ed4f41a3cc169893ee50765e7e996a63bbd2e9 (patch)
tree0add7480e210a113c12cf1e6ac6cccf5985c567a
parent92b98a982bd4cf15393c53236e55c95eecb4adfa (diff)
complex.c: rb_complex prefix
* complex.c (rb_complex_plus, rb_complex_mul): rename to rb_complex prefix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--complex.c8
-rw-r--r--internal.h4
-rw-r--r--numeric.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/complex.c b/complex.c
index 181448d8d8..9419ea9818 100644
--- a/complex.c
+++ b/complex.c
@@ -715,11 +715,11 @@ f_addsub(VALUE self, VALUE other,
* 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 bz)
* 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)
}
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,
diff --git a/internal.h b/internal.h
index f23d7e2be0..1a75532e79 100644
--- a/internal.h
+++ b/internal.h
@@ -901,8 +901,8 @@ CONSTFUNC(const char * rb_insns_name(int i));
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);
diff --git a/numeric.c b/numeric.c
index af57ccdfc7..7296ab704a 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3240,7 +3240,7 @@ fix_plus(VALUE x, VALUE y)
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)
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, '*');