Skip to content

Commit

Permalink
only enforce inlining of XXH64_finalize() when XXH_INLINE_ALL is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyan4973 committed Dec 5, 2024
1 parent e876423 commit c5a6a14
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c5a6a14

Please sign in to comment.