From 278b96ff97878af2ee4281596214f396cd57d00f Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Tue, 17 Apr 2001 15:35:46 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'v1_6_4_preview2'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_6_4_preview2@1327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- hash.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 2a5803c96e..eb6e73908c 100644 --- a/hash.c +++ b/hash.c @@ -79,16 +79,16 @@ static int rb_any_hash(a) VALUE a; { - unsigned int hval; + VALUE hval; switch (TYPE(a)) { case T_FIXNUM: case T_SYMBOL: - hval = a; + return (int)a; break; case T_STRING: - hval = rb_str_hash(a); + return rb_str_hash(a); break; default: @@ -98,9 +98,8 @@ rb_any_hash(a) hval = rb_funcall(hval, '%', 1, INT2FIX(65439)); } ENABLE_INTS; - hval = FIX2LONG(hval); + return (int)FIX2LONG(hval); } - return hval; } static struct st_hash_type objhash = { -- cgit v1.2.3