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

ruby-changes:17600

From: usa <ko1@a...>
Date: Wed, 27 Oct 2010 12:02:35 +0900 (JST)
Subject: [ruby-changes:17600] Ruby:r29605 (trunk): * include/ruby/ruby.h (NUM2LONG_internal): add cast to get rid of a

usa	2010-10-27 12:00:26 +0900 (Wed, 27 Oct 2010)

  New Revision: 29605

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

  Log:
    * include/ruby/ruby.h (NUM2LONG_internal): add cast to get rid of a
      non GCC compiler warning. this is intentional type conversion.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 29604)
+++ include/ruby/ruby.h	(revision 29605)
@@ -481,7 +481,7 @@
 
 SIGNED_VALUE rb_num2long(VALUE);
 VALUE rb_num2ulong(VALUE);
-#define NUM2LONG_internal(x) (FIXNUM_P(x) ? FIX2LONG(x) : rb_num2long(x))
+#define NUM2LONG_internal(x) ((long)(FIXNUM_P(x) ? FIX2LONG(x) : rb_num2long(x)))
 #ifdef __GNUC__
 #define NUM2LONG(x) \
     __extension__ ({VALUE num2long_x = (x); NUM2LONG_internal(num2long_x);})
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29604)
+++ ChangeLog	(revision 29605)
@@ -1,3 +1,8 @@
+Wed Oct 27 11:58:58 2010  NAKAMURA Usaku  <usa@r...>
+
+	* include/ruby/ruby.h (NUM2LONG_internal): add cast to get rid of a
+	  non GCC compiler warning. this is intentional type conversion.
+
 Wed Oct 27 09:25:46 2010  NARUSE, Yui  <naruse@r...>
 
 	* cont.c: apply documentation patch by Run Paint Run Run.

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

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