From bb3475e8eb379ee18f3d8f37caa8040b852a6213 Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Sat, 23 Mar 2024 01:21:46 +0100 Subject: all: rename redis -> redict symbols and comments Signed-off-by: Anna (navi) Figueiredo Gomes --- alloc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'alloc.c') diff --git a/alloc.c b/alloc.c index 294969b..342192b 100644 --- a/alloc.c +++ b/alloc.c @@ -14,7 +14,7 @@ #include #include -hiredisAllocFuncs hiredisAllocFns = { +hiredictAllocFuncs hiredictAllocFns = { .mallocFn = malloc, .callocFn = calloc, .reallocFn = realloc, @@ -22,18 +22,18 @@ hiredisAllocFuncs hiredisAllocFns = { .freeFn = free, }; -/* Override hiredis' allocators with ones supplied by the user */ -hiredisAllocFuncs hiredisSetAllocators(hiredisAllocFuncs *override) { - hiredisAllocFuncs orig = hiredisAllocFns; +/* Override hiredict' allocators with ones supplied by the user */ +hiredictAllocFuncs hiredictSetAllocators(hiredictAllocFuncs *override) { + hiredictAllocFuncs orig = hiredictAllocFns; - hiredisAllocFns = *override; + hiredictAllocFns = *override; return orig; } /* Reset allocators to use libc defaults */ -void hiredisResetAllocators(void) { - hiredisAllocFns = (hiredisAllocFuncs) { +void hiredictResetAllocators(void) { + hiredictAllocFns = (hiredictAllocFuncs) { .mallocFn = malloc, .callocFn = calloc, .reallocFn = realloc, @@ -45,7 +45,7 @@ void hiredisResetAllocators(void) { #ifdef _WIN32 void *hi_malloc(size_t size) { - return hiredisAllocFns.mallocFn(size); + return hiredictAllocFns.mallocFn(size); } void *hi_calloc(size_t nmemb, size_t size) { @@ -53,19 +53,19 @@ void *hi_calloc(size_t nmemb, size_t size) { if (SIZE_MAX / size < nmemb) return NULL; - return hiredisAllocFns.callocFn(nmemb, size); + return hiredictAllocFns.callocFn(nmemb, size); } void *hi_realloc(void *ptr, size_t size) { - return hiredisAllocFns.reallocFn(ptr, size); + return hiredictAllocFns.reallocFn(ptr, size); } char *hi_strdup(const char *str) { - return hiredisAllocFns.strdupFn(str); + return hiredictAllocFns.strdupFn(str); } void hi_free(void *ptr) { - hiredisAllocFns.freeFn(ptr); + hiredictAllocFns.freeFn(ptr); } #endif -- cgit v1.2.3