aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
parentf0b6cb6fc7e476dc162a907c021d52831383ba34 (diff)
downloadruby-783cffce1dc7a440f4cb04695961fc7349de3024.tar.gz
* 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
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 03440bf16a..d632f57226 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)