# define __PERL_HASH_SEED_STATE(seed,state) S_perl_siphash_seed_state(seed,state)
# define __PERL_HASH_WITH_STATE(state,str,len) S_perl_hash_siphash_1_3_with_state((state),(U8*)(str),(len))
#elif defined(PERL_HASH_FUNC_STADTX)
-# define __PERL_HASH_FUNC "STATDX"
+# define __PERL_HASH_FUNC "STADTX"
# define __PERL_HASH_SEED_BYTES 16
# define __PERL_HASH_STATE_BYTES 32
# define __PERL_HASH_SEED_STATE(seed,state) stadtx_seed_state(seed,state)
#endif
-#if PERL_HASH_USE_SBOX32_ALSO == 1
+#if PERL_HASH_USE_SBOX32_ALSO != 1
# define _PERL_HASH_FUNC __PERL_HASH_FUNC
# define _PERL_HASH_SEED_BYTES __PERL_HASH_SEED_BYTES
# define _PERL_HASH_STATE_BYTES __PERL_HASH_STATE_BYTES
#define _PERL_HASH_FUNC "SBOX32_WITH_" __PERL_HASH_FUNC
-#define _PERL_HASH_SEED_BYTES ( __PERL_HASH_SEED_BYTES + ( 3 * sizeof(U32) ) )
+#define _PERL_HASH_SEED_BYTES ( __PERL_HASH_SEED_BYTES + (int)( 3 * sizeof(U32) ) )
#define _PERL_HASH_STATE_BYTES \
- ( __PERL_HASH_SEED_BYTES + ( ( 1 + ( 256 * SBOX32_MAX_LEN ) ) * sizeof(U32) ) )
+ ( __PERL_HASH_STATE_BYTES + ( ( 1 + ( 256 * SBOX32_MAX_LEN ) ) * sizeof(U32) ) )
#define _PERL_HASH_SEED_STATE(seed,state) STMT_START { \
__PERL_HASH_SEED_STATE(seed,state); \
- sbox32_seed_state96(seed + __PERL_HASH_SEED_BYTES , state + __PERL_HASH_STATE_BYTES); \
+ sbox32_seed_state96(seed + __PERL_HASH_SEED_BYTES, state + __PERL_HASH_STATE_BYTES); \
} STMT_END
-#define _PERL_HASH_WITH_STATE(state,str,len) \
- ((len <= SBOX32_MAX_LEN) \
- ? sbox32_hash_with_state((state + __PERL_HASH_STATE_BYTES),(U8*)(str),(len)) \
+#define _PERL_HASH_WITH_STATE(state,str,len) \
+ (LIKELY(len <= SBOX32_MAX_LEN) \
+ ? sbox32_hash_with_state((state + __PERL_HASH_STATE_BYTES),(U8*)(str),(len)) \
: __PERL_HASH_WITH_STATE((state),(str),(len)))
#endif
}
#define PERL_HASH_WITH_SEED(seed,hash,str,len) \
- (hash) = S_perl_hash_with_seed(seed,str,len)
+ (hash) = S_perl_hash_with_seed((const U8 *) seed, (const U8 *) str,len)
#define PERL_HASH_WITH_STATE(state,hash,str,len) \
(hash) = _PERL_HASH_WITH_STATE((state),(U8*)(str),(len))
#define PERL_HASH_SEED_STATE(seed,state) _PERL_HASH_SEED_STATE(seed,state)
* initialze whatever state it might need later in hashing. */
#ifndef PERL_HASH_SEED
-# if defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT)
+# if defined(USE_HASH_SEED)
# define PERL_HASH_SEED PL_hash_seed
# else
/* this is a 512 bit seed, which should be more than enough for the
v0 = v2 = U8TO64_LE(key + 0); \
v1 = v3 = U8TO64_LE(key + 8); \
/* "somepseudorandomlygeneratedbytes" */ \
- v0 ^= 0x736f6d6570736575ull; \
- v1 ^= 0x646f72616e646f6dull; \
- v2 ^= 0x6c7967656e657261ull; \
- v3 ^= 0x7465646279746573ull; \
+ v0 ^= UINT64_C(0x736f6d6570736575); \
+ v1 ^= UINT64_C(0x646f72616e646f6d); \
+ v2 ^= UINT64_C(0x6c7967656e657261); \
+ v3 ^= UINT64_C(0x7465646279746573); \
} while (0)
PERL_STATIC_INLINE
#endif /* defined(CAN64BITHASH) */
-
-
-
#endif /*compile once*/
/*