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

ruby-changes:30809

From: nobu <ko1@a...>
Date: Sun, 8 Sep 2013 19:52:58 +0900 (JST)
Subject: [ruby-changes:30809] nobu:r42888 (trunk): rat.c: suppress warning

nobu	2013-09-08 19:52:52 +0900 (Sun, 08 Sep 2013)

  New Revision: 42888

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

  Log:
    rat.c: suppress warning
    
    * ext/-test-/rational/rat.c (big): used only if GMP is available.

  Modified files:
    trunk/ext/-test-/rational/rat.c
Index: ext/-test-/rational/rat.c
===================================================================
--- ext/-test-/rational/rat.c	(revision 42887)
+++ ext/-test-/rational/rat.c	(revision 42888)
@@ -1,6 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/-test-/rational/rat.c#L1
 #include "ruby.h"
 #include "internal.h"
 
+#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
 static VALUE
 big(VALUE x)
 {
@@ -11,6 +12,7 @@ big(VALUE x) https://github.com/ruby/ruby/blob/trunk/ext/-test-/rational/rat.c#L12
     rb_raise(rb_eTypeError, "can't convert %s to Bignum",
             rb_obj_classname(x));
 }
+#endif
 
 static VALUE
 gcd_normal(VALUE x, VALUE y)

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

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