summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-09 11:34:17 (GMT)
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-09 11:34:17 (GMT)
commitac2864a871ae15ece8d268d47d9e9a1821b0c70b (patch)
tree325e02b244ed22a0135d3f0d93b3c186670b8482 /object.c
parent4ee57e088fad7e383e851778c6fd44e87335eb0c (diff)
* hash.c (rb_objid_hash): should return `long'. brushup r44534.
* object.c (rb_obj_hash): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/object.c b/object.c
index 1398201..5b5e283 100644
--- a/object.c
+++ b/object.c
@@ -161,7 +161,7 @@ rb_obj_equal(VALUE obj1, VALUE obj2)
VALUE
rb_obj_hash(VALUE obj)
{
- st_index_t rb_objid_hash(st_index_t index);
+ long rb_objid_hash(st_index_t index);
VALUE oid = rb_obj_id(obj);
#if SIZEOF_LONG == SIZEOF_VOIDP
st_index_t index = NUM2LONG(oid);
@@ -170,8 +170,7 @@ rb_obj_hash(VALUE obj)
#else
# error not supported
#endif
- st_index_t h = rb_objid_hash(index);
- return LONG2FIX(h);
+ return LONG2FIX(rb_objid_hash(index));
}
/*