From ee44cf9668265b17d3387db79a7c89b9c28f4d6b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 9 Feb 2014 04:19:25 +0000 Subject: murmur3: cleanup inlines force inline didn't work for non-static functions (probably without extern), and we didn't need non-static functions in those cases anyways, so just use static inline and trust the compiler to do its thing. --- ext/tdb/murmur3.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ext/tdb/murmur3.c b/ext/tdb/murmur3.c index 9980b3d..e8fc030 100644 --- a/ext/tdb/murmur3.c +++ b/ext/tdb/murmur3.c @@ -9,7 +9,6 @@ */ #include -#define FORCE_INLINE __attribute__((always_inline)) static inline uint32_t rotl32(uint32_t x, int8_t r) { @@ -25,7 +24,7 @@ static inline uint32_t rotl32(uint32_t x, int8_t r) * handle aligned reads, do the conversion here */ -static FORCE_INLINE uint32_t getblock(const uint32_t * p, int i) +static inline uint32_t getblock(const uint32_t * p, int i) { return p[i]; } @@ -34,7 +33,7 @@ static FORCE_INLINE uint32_t getblock(const uint32_t * p, int i) * Finalization mix - force all bits of a hash block to avalanche */ -static FORCE_INLINE uint32_t fmix(uint32_t h) +static inline uint32_t fmix(uint32_t h) { h ^= h >> 16; h *= 0x85ebca6b; @@ -105,12 +104,12 @@ static inline uint64_t rotl64(uint64_t x, int8_t r) #define ROTL64(x,y) rotl64(x,y) -FORCE_INLINE uint64_t getblock64(const uint64_t * p, int i) +static inline uint64_t getblock64(const uint64_t * p, int i) { return p[i]; } -FORCE_INLINE uint64_t fmix64(uint64_t k) +static inline uint64_t fmix64(uint64_t k) { k ^= k >> 33; k *= BIG_CONSTANT(0xff51afd7ed558ccd); -- cgit v1.2.3-24-ge0c7