From c5a6a14676d1ebb3933e79eb1362837680652ca8 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Thu, 5 Dec 2024 00:44:07 -0500 Subject: [PATCH] only enforce inlining of XXH64_finalize() when XXH_INLINE_ALL is enabled --- xxhash.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xxhash.h b/xxhash.h index fe3b884e..cb8d3f58 100644 --- a/xxhash.h +++ b/xxhash.h @@ -2418,6 +2418,12 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) # define XXH_NO_INLINE static #endif +#if defined(XXH_INLINE_ALL) +# define XXH_STATIC XXH_FORCE_INLINE +#else +# define XXH_STATIC static +#endif + #if XXH3_INLINE_SECRET # define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE #else @@ -3458,7 +3464,7 @@ static xxh_u64 XXH64_avalanche(xxh_u64 hash) * @return The finalized hash * @see XXH32_finalize(). */ -XXH_FORCE_INLINE XXH_PUREF xxh_u64 +XXH_STATIC XXH_PUREF xxh_u64 XXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align) { if (ptr==NULL) XXH_ASSERT(len == 0);