From d18575f18c6ee61ce80492e82cae7361358d570a Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Sat, 20 Jun 2020 22:06:53 +0200 Subject: hv_func.h: Move static declaration so it works with Siphash builds --- hv_func.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'hv_func.h') diff --git a/hv_func.h b/hv_func.h index 919d850bac..7739638f23 100644 --- a/hv_func.h +++ b/hv_func.h @@ -105,14 +105,6 @@ #endif -PERL_STATIC_INLINE -U32 S_perl_hash_with_seed(const U8 * const seed, const U8 * const str, const STRLEN len) -{ - U8 state[_PERL_HASH_STATE_BYTES]; - _PERL_HASH_SEED_STATE(seed,state); - return _PERL_HASH_WITH_STATE(state,str,len); -} - #define PERL_HASH_WITH_SEED(seed,hash,str,len) \ (hash) = S_perl_hash_with_seed((const U8 *) seed, (const U8 *) str,len) #define PERL_HASH_WITH_STATE(state,hash,str,len) \ @@ -160,6 +152,13 @@ U32 S_perl_hash_with_seed(const U8 * const seed, const U8 * const str, const STR #define PERL_HASH_INTERNAL(hash,str,len) PERL_HASH(hash,str,len) #endif +PERL_STATIC_INLINE U32 +S_perl_hash_with_seed(const U8 * seed, const U8 *str, STRLEN len) { + U8 state[_PERL_HASH_STATE_BYTES]; + _PERL_HASH_SEED_STATE(seed,state); + return _PERL_HASH_WITH_STATE(state,str,len); +} + #endif /*compile once*/ /* -- cgit v1.2.1