diff options
author | michael-grunder <michael.grunder@gmail.com> | 2020-05-30 09:30:01 -0700 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2020-05-30 09:30:01 -0700 |
commit | ffd6eaebd64a7c993f42181e12124e19fb914fcd (patch) | |
tree | 1c22bc3b17da8d3f4b6262b0aefb2f2dc51de86e /alloc.h | |
parent | 190bca88d0635f1e53d9e39fc69f4f21b67a1baf (diff) | |
parent | e553e0f382394ea055d0b6b7637ab2534cf38146 (diff) |
Merge branch 'master' into new-ssl-api
Diffstat (limited to 'alloc.h')
-rw-r--r-- | alloc.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -39,11 +39,11 @@ extern "C" { /* Structure pointing to our actually configured allocators */ typedef struct hiredisAllocFuncs { - void *(*malloc)(size_t); - void *(*calloc)(size_t,size_t); - void *(*realloc)(void*,size_t); - char *(*strdup)(const char*); - void (*free)(void*); + void *(*mallocFn)(size_t); + void *(*callocFn)(size_t,size_t); + void *(*reallocFn)(void*,size_t); + char *(*strdupFn)(const char*); + void (*freeFn)(void*); } hiredisAllocFuncs; hiredisAllocFuncs hiredisSetAllocators(hiredisAllocFuncs *ha); @@ -55,23 +55,23 @@ void hiredisResetAllocators(void); extern hiredisAllocFuncs hiredisAllocFns; static inline void *hi_malloc(size_t size) { - return hiredisAllocFns.malloc(size); + return hiredisAllocFns.mallocFn(size); } static inline void *hi_calloc(size_t nmemb, size_t size) { - return hiredisAllocFns.calloc(nmemb, size); + return hiredisAllocFns.callocFn(nmemb, size); } static inline void *hi_realloc(void *ptr, size_t size) { - return hiredisAllocFns.realloc(ptr, size); + return hiredisAllocFns.reallocFn(ptr, size); } static inline char *hi_strdup(const char *str) { - return hiredisAllocFns.strdup(str); + return hiredisAllocFns.strdupFn(str); } static inline void hi_free(void *ptr) { - hiredisAllocFns.free(ptr); + hiredisAllocFns.freeFn(ptr); } #else |