summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-27 13:11:06 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-27 13:11:06 +0000
commit783cffce1dc7a440f4cb04695961fc7349de3024 (patch)
tree413b19a449059db1a109d187baa16521b6d8a47f
parentf0b6cb6fc7e476dc162a907c021d52831383ba34 (diff)
* include/ruby/ruby.h (RHASH_SIZE): Add a cast to suppress a
warning, comparison between signed and unsigned integer expressions [-Wsign-compare], on ILP32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--include/ruby/ruby.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 269989e..fb7259d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon May 27 22:09:33 2013 Tanaka Akira <akr@fsij.org>
+
+ * 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@atdot.net>
* include/ruby/ruby.h: rename RUBY_INTERNAL_EVENT_FREE to
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 03440bf..d632f57 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -971,7 +971,7 @@ struct RHash {
#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)