summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-11-01 20:58:31 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-11-01 20:58:31 (GMT)
commitd9927ea693262df817a43bca5b4ea6d299f7db5f (patch)
tree8be3909507d4f4512443bb25569d29c318ae9719
parent55e8a47474fb63d10a0e6c08d3f761795a9a724f (diff)
downloadlz4-d9927ea693262df817a43bca5b4ea6d299f7db5f.zip
lz4-d9927ea693262df817a43bca5b4ea6d299f7db5f.tar.gz
lz4-d9927ea693262df817a43bca5b4ea6d299f7db5f.tar.bz2
Updated xxHash to r38
-rw-r--r--xxhash.c18
1 files 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 <stdlib.h>
-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 <string.h>
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;
};