summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-22 13:09:37 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-22 13:09:37 +0000
commitb8cc476ce9a3e931fb474ee83e8ae147bcd9c86e (patch)
tree7e4873181f0b7e90bb83cdd79d0753f092b134eb /complex.c
parent4f03a239dcd6704e4ae7a7029dc6b31d579e9f7c (diff)
downloadruby-b8cc476ce9a3e931fb474ee83e8ae147bcd9c86e.tar.gz
use predefined IDs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/complex.c b/complex.c
index cee9770f67..9b54d6bbc2 100644
--- a/complex.c
+++ b/complex.c
@@ -12,6 +12,7 @@
#endif
#include <math.h>
#include "internal.h"
+#include "id.h"
#define NDEBUG
#include "ruby_assert.h"
@@ -33,10 +34,12 @@ static VALUE nucomp_arg(VALUE self);
static ID id_abs, id_arg,
id_denominator, id_expt, id_fdiv,
id_negate, id_numerator, id_quo,
- id_real_p, id_to_f, id_to_i, id_to_r,
+ id_real_p, id_to_f,
id_i_real, id_i_imag,
id_finite_p, id_infinite_p, id_rationalize,
id_PI;
+#define id_to_i idTo_i
+#define id_to_r idTo_r
#define f_boolcast(x) ((x) ? Qtrue : Qfalse)
@@ -2204,8 +2207,6 @@ Init_Complex(void)
id_quo = rb_intern("quo");
id_real_p = rb_intern("real?");
id_to_f = rb_intern("to_f");
- id_to_i = rb_intern("to_i");
- id_to_r = rb_intern("to_r");
id_i_real = rb_intern("@real");
id_i_imag = rb_intern("@image"); /* @image, not @imag */
id_finite_p = rb_intern("finite?");