From d9927ea693262df817a43bca5b4ea6d299f7db5f Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sat, 1 Nov 2014 21:58:31 +0100 Subject: Updated xxHash to r38 --- xxhash.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/xxhash.c b/xxhash.c index 529d69c..e6c2f31 100644 --- a/xxhash.c +++ b/xxhash.c @@ -84,14 +84,8 @@ You can contact the author at : // Modify the local functions below should you wish to use some other memory routines // for malloc(), free() #include -FORCE_INLINE void* XXH_malloc(size_t s) -{ - return malloc(s); -} -FORCE_INLINE void XXH_free (void* p) -{ - free(p); -} +FORCE_INLINE void* XXH_malloc(size_t s) { return malloc(s); } +FORCE_INLINE void XXH_free (void* p) { free(p); } // for memcpy() #include FORCE_INLINE void* XXH_memcpy(void* dest, const void* src, size_t size) @@ -535,22 +529,22 @@ typedef struct XXH32_state_t* XXH32_createState(void) { XXH_STATIC_ASSERT(sizeof(XXH32_state_t) >= sizeof(XXH_istate32_t)); // A compilation error here means XXH32_state_t is not large enough - return (XXH32_state_t*)malloc(sizeof(XXH32_state_t)); + return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t)); } XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr) { - free(statePtr); + XXH_free(statePtr); return XXH_OK; }; XXH64_state_t* XXH64_createState(void) { XXH_STATIC_ASSERT(sizeof(XXH64_state_t) >= sizeof(XXH_istate64_t)); // A compilation error here means XXH64_state_t is not large enough - return (XXH64_state_t*)malloc(sizeof(XXH64_state_t)); + return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t)); } XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr) { - free(statePtr); + XXH_free(statePtr); return XXH_OK; }; -- cgit v0.12