summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-02-09 04:19:25 +0000
committerEric Wong <normalperson@yhbt.net>2014-02-09 09:24:13 +0000
commitee44cf9668265b17d3387db79a7c89b9c28f4d6b (patch)
tree67f763247f97f9d5a9af339797fdd27970fe9274
parent54301895782c299ca98982da76189359311a8769 (diff)
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.
-rw-r--r--ext/tdb/murmur3.c9
1 files 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 <stdint.h>
-#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);