[前][次][番号順一覧][スレッド一覧]

ruby-changes:12074

From: tadf <ko1@a...>
Date: Fri, 19 Jun 2009 20:48:10 +0900 (JST)
Subject: [ruby-changes:12074] Ruby:r23744 (trunk): * complex.c: constant COMPLEX_NAME has been removed.

tadf	2009-06-19 20:47:53 +0900 (Fri, 19 Jun 2009)

  New Revision: 23744

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23744

  Log:
    * complex.c: constant COMPLEX_NAME has been removed.
    * rational.c: constant RATIONAL_NAME has been removed.

  Modified files:
    trunk/ChangeLog
    trunk/complex.c
    trunk/rational.c

Index: complex.c
===================================================================
--- complex.c	(revision 23743)
+++ complex.c	(revision 23744)
@@ -11,10 +11,6 @@
 #define NDEBUG
 #include <assert.h>
 
-#ifndef COMPLEX_NAME
-#define COMPLEX_NAME "Complex"
-#endif
-
 #define ZERO INT2FIX(0)
 #define ONE INT2FIX(1)
 #define TWO INT2FIX(2)
@@ -1404,7 +1400,7 @@
     id_to_r = rb_intern("to_r");
     id_to_s = rb_intern("to_s");
 
-    rb_cComplex = rb_define_class(COMPLEX_NAME, rb_cNumeric);
+    rb_cComplex = rb_define_class("Complex", rb_cNumeric);
 
     rb_define_alloc_func(rb_cComplex, nucomp_s_alloc);
     rb_undef_method(CLASS_OF(rb_cComplex), "allocate");
@@ -1420,7 +1416,7 @@
     rb_define_singleton_method(rb_cComplex, "rect", nucomp_s_new, -1);
     rb_define_singleton_method(rb_cComplex, "polar", nucomp_s_polar, 2);
 
-    rb_define_global_function(COMPLEX_NAME, nucomp_f_complex, -1);
+    rb_define_global_function("Complex", nucomp_f_complex, -1);
 
     rb_undef_method(rb_cComplex, "<");
     rb_undef_method(rb_cComplex, "<=");
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 23743)
+++ ChangeLog	(revision 23744)
@@ -1,3 +1,9 @@
+Fri Jun 19 20:44:45 2009  Tadayoshi Funaba  <tadf@d...>
+
+	* complex.c: constant COMPLEX_NAME has been removed.
+
+	* rational.c: constant RATIONAL_NAME has been removed.
+
 Fri Jun 19 20:39:46 2009  Tadayoshi Funaba  <tadf@d...>
 
 	* rational.c: added rdoc.  a patch from Run Paint Run Run.
Index: rational.c
===================================================================
--- rational.c	(revision 23743)
+++ rational.c	(revision 23744)
@@ -16,10 +16,6 @@
 #define NDEBUG
 #include <assert.h>
 
-#ifndef RATIONAL_NAME
-#define RATIONAL_NAME "Rational"
-#endif
-
 #define ZERO INT2FIX(0)
 #define ONE INT2FIX(1)
 #define TWO INT2FIX(2)
@@ -2225,7 +2221,7 @@
     rb_undef_method(CLASS_OF(rb_cRational), "new");
 #endif
 
-    rb_define_global_function(RATIONAL_NAME, nurat_f_rational, -1);
+    rb_define_global_function("Rational", nurat_f_rational, -1);
 
     rb_define_method(rb_cRational, "numerator", nurat_numerator, 0);
     rb_define_method(rb_cRational, "denominator", nurat_denominator, 0);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]