diff options
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -125,7 +125,14 @@ VALUE rb_obj_hash(VALUE obj) { VALUE oid = rb_obj_id(obj); - st_index_t h = rb_hash_end(rb_hash_start(NUM2LONG(oid))); +#if SIZEOF_LONG == SIZEOF_VOIDP + st_index_t index = NUM2LONG(oid); +#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP + st_index_t index = NUM2LL(oid); +#else +# error not supported +#endif + st_index_t h = rb_hash_end(rb_hash_start(index)); return LONG2FIX(h); } |