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

ruby-changes:9076

From: tadf <ko1@a...>
Date: Thu, 11 Dec 2008 00:00:42 +0900 (JST)
Subject: [ruby-changes:9076] Ruby:r20612 (trunk): * complex.c: avoided warnings on cpp.

tadf	2008-12-11 00:00:13 +0900 (Thu, 11 Dec 2008)

  New Revision: 20612

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

  Log:
    * complex.c: avoided warnings on cpp.
    * rational.c: ditto.

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

Index: complex.c
===================================================================
--- complex.c	(revision 20611)
+++ complex.c	(revision 20612)
@@ -320,6 +320,10 @@
     return nucomp_s_new_internal(klass, x, y);
 }
 
+#ifndef RUBY_VERSION_CODE
+#include "version.h"
+#endif
+
 #if RUBY_VERSION_CODE < 200
 #define CANON
 #endif
@@ -1427,6 +1431,10 @@
     rb_undef_method(rb_cComplex, "step");
     rb_undef_method(rb_cComplex, "truncate");
 
+#ifndef NUBY
+#define NUBY 0
+#endif
+
 #if NUBY
     rb_undef_method(rb_cComplex, "//");
 #endif
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20611)
+++ ChangeLog	(revision 20612)
@@ -1,3 +1,9 @@
+Wed Dec 10 23:58:56 2008  Tadayoshi Funaba  <tadf@d...>
+
+	* complex.c: avoided warnings on cpp.
+
+	* rational.c: ditto.
+
 Wed Dec 10 21:32:02 2008  Kouhei Sutou  <kou@c...>
 
 	* lib/rss/maker.rb (RSS::Maker.[]): add.
Index: rational.c
===================================================================
--- rational.c	(revision 20611)
+++ rational.c	(revision 20612)
@@ -377,6 +377,10 @@
     return nurat_s_new_internal(klass, x, y);
 }
 
+#ifndef RUBY_VERSION_CODE
+#include "version.h"
+#endif
+
 #if RUBY_VERSION_CODE < 200
 #define CANON
 #endif
@@ -1541,9 +1545,15 @@
     rb_define_method(rb_cRational, "coerce", nurat_coerce, 1);
 
     rb_define_method(rb_cRational, "div", nurat_idiv, 1);
+
+#ifndef NUBY
+#define NUBY 0
+#endif
+
 #if NUBY
     rb_define_method(rb_cRational, "//", nurat_idiv, 1);
 #endif
+
     rb_define_method(rb_cRational, "modulo", nurat_mod, 1);
     rb_define_method(rb_cRational, "%", nurat_mod, 1);
     rb_define_method(rb_cRational, "divmod", nurat_divmod, 1);

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

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