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

ruby-changes:28908

From: akr <ko1@a...>
Date: Mon, 27 May 2013 22:12:24 +0900 (JST)
Subject: [ruby-changes:28908] akr:r40960 (trunk): * include/ruby/ruby.h (RHASH_SIZE): Add a cast to suppress a

akr	2013-05-27 22:11:06 +0900 (Mon, 27 May 2013)

  New Revision: 40960

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

  Log:
    * include/ruby/ruby.h (RHASH_SIZE): Add a cast to suppress a
      warning, comparison between signed and unsigned integer
      expressions [-Wsign-compare], on ILP32.

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

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 40959)
+++ include/ruby/ruby.h	(revision 40960)
@@ -971,7 +971,7 @@ struct RHash { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L971
 #define RHASH_TBL(h) rb_hash_tbl(h)
 #define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev)
 #define RHASH_IFNONE(h) (RHASH(h)->ifnone)
-#define RHASH_SIZE(h) (RHASH(h)->ntbl ? RHASH(h)->ntbl->num_entries : 0)
+#define RHASH_SIZE(h) (RHASH(h)->ntbl ? (st_index_t)RHASH(h)->ntbl->num_entries : 0)
 #define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
 #define RHASH_SET_IFNONE(h, ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40959)
+++ ChangeLog	(revision 40960)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon May 27 22:09:33 2013  Tanaka Akira  <akr@f...>
+
+	* include/ruby/ruby.h (RHASH_SIZE): Add a cast to suppress a
+	  warning, comparison between signed and unsigned integer
+	  expressions [-Wsign-compare], on ILP32.
+
 Mon May 27 19:25:47 2013  Koichi Sasada  <ko1@a...>
 
 	* include/ruby/ruby.h: rename RUBY_INTERNAL_EVENT_FREE to

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

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