summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 15:18:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 15:18:22 +0000
commit537d7ff1407390ef1b89ba32f0c418e1a1266dde (patch)
tree83f0672a0476b824a8bd3a6712437eae5b74e6ff /st.c
parenta176b065d2e19f64c7425c2928829f5280532cce (diff)
* st.c (MurmurMagic): get rid of literal overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r--st.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/st.c b/st.c
index ec518e9..11e3b5d 100644
--- a/st.c
+++ b/st.c
@@ -1003,13 +1003,15 @@ strhash(st_data_t arg)
#define MURMUR 2
#endif
+#define MurmurMagic_1 (st_index_t)0xc6a4a793
+#define MurmurMagic_2 (st_index_t)0x5bd1e995
#if MURMUR == 1
-#define MurmurMagic 0xc6a4a793
+#define MurmurMagic MurmurMagic_1
#elif MURMUR == 2
#if SIZEOF_ST_INDEX_T > 4
-#define MurmurMagic 0xc6a4a7935bd1e995
+#define MurmurMagic ((MurmurMagic_1 << 32) | MurmurMagic_2)
#else
-#define MurmurMagic 0x5bd1e995
+#define MurmurMagic MurmurMagic_2
#endif
#endif