summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-08 13:10:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-08 13:10:04 +0000
commit31b7ae00c05aef76416c767df92be45d62e9d06a (patch)
tree87743fd1893484f1af704d20e3695810ea21a893 /hash.c
parent034414741e4616f7a305f12fe36e1f9a6b0ff074 (diff)
* include/ruby/st.h (st_hash_func): use st_index_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hash.c b/hash.c
index ce8af6c6d9..bc0a2511e5 100644
--- a/hash.c
+++ b/hash.c
@@ -72,11 +72,11 @@ rb_hash(VALUE obj)
}
}
-static int
+static st_index_t
rb_any_hash(VALUE a)
{
VALUE hval;
- VALUE hnum;
+ st_index_t hnum;
switch (TYPE(a)) {
case T_FIXNUM:
@@ -96,7 +96,7 @@ rb_any_hash(VALUE a)
hnum = FIX2LONG(hval);
}
hnum <<= 1;
- return (int)RSHIFT(hnum, 1);
+ return (st_index_t)RSHIFT(hnum, 1);
}
static const struct st_hash_type objhash = {
@@ -1544,7 +1544,7 @@ rb_hash_eql(VALUE hash1, VALUE hash2)
static int
hash_i(VALUE key, VALUE val, VALUE arg)
{
- VALUE *hval = (VALUE *)arg;
+ st_index_t *hval = (st_index_t *)arg;
if (key == Qundef) return ST_CONTINUE;
*hval ^= rb_hash_end(rb_hash_uint(rb_hash_start(rb_hash(key)), rb_hash(val)));
@@ -1554,7 +1554,7 @@ hash_i(VALUE key, VALUE val, VALUE arg)
static VALUE
recursive_hash(VALUE hash, VALUE dummy, int recur)
{
- VALUE hval;
+ st_index_t hval;
if (recur) {
rb_raise(rb_eArgError, "recursive key for hash");