ruby-changes:50463
From: nobu <ko1@a...>
Date: Tue, 27 Feb 2018 10:17:53 +0900 (JST)
Subject: [ruby-changes:50463] nobu:r62591 (trunk): complex.c: use predefined IDs
nobu 2018-02-27 10:17:46 +0900 (Tue, 27 Feb 2018) New Revision: 62591 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62591 Log: complex.c: use predefined IDs Modified files: trunk/complex.c Index: complex.c =================================================================== --- complex.c (revision 62590) +++ complex.c (revision 62591) @@ -32,14 +32,15 @@ static VALUE nucomp_abs(VALUE self); https://github.com/ruby/ruby/blob/trunk/complex.c#L32 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_denominator, id_fdiv, id_numerator, id_quo, 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 id_negate idUMinus +#define id_expt idPow #define f_boolcast(x) ((x) ? Qtrue : Qfalse) @@ -2120,9 +2121,7 @@ Init_Complex(void) https://github.com/ruby/ruby/blob/trunk/complex.c#L2121 id_abs = rb_intern("abs"); id_arg = rb_intern("arg"); id_denominator = rb_intern("denominator"); - id_expt = rb_intern("**"); id_fdiv = rb_intern("fdiv"); - id_negate = rb_intern("-@"); id_numerator = rb_intern("numerator"); id_quo = rb_intern("quo"); id_real_p = rb_intern("real?"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/