1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

hash.c: use uint128_t

* hash.c (mult_and_mix): use uint128_t instead of __uint128_t.
  [ruby-core:84438] [Bug #14231]

From: Nobuyoshi Nakada <nobu@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-12-25 12:32:10 +00:00
parent 8880af9a3b
commit ce52dfde9c

2
hash.c
View file

@ -231,7 +231,7 @@ static inline uint64_t
mult_and_mix(uint64_t m1, uint64_t m2)
{
#if defined HAVE_UINT128_T
__uint128_t r = (__uint128_t) m1 * (__uint128_t) m2;
uint128_t r = (uint128_t) m1 * (uint128_t) m2;
return (uint64_t) (r >> 64) ^ (uint64_t) r;
#else
uint64_t hm1 = m1 >> 32, hm2 = m2 >> 32;