X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=src%2Fvppinfra%2FcJSON.h;h=1474c4e5c4974c01a4c8f1275d51699915ea9a64;hp=e97e5f4cdc4c97cd734bb55cf86d660b388c2fa4;hb=36217e3ca;hpb=3459ece6da90627b161e2128b5926f1e58e7db65 diff --git a/src/vppinfra/cJSON.h b/src/vppinfra/cJSON.h index e97e5f4cdc4..1474c4e5c49 100644 --- a/src/vppinfra/cJSON.h +++ b/src/vppinfra/cJSON.h @@ -127,6 +127,8 @@ typedef struct cJSON_Hooks /* malloc/free are CDECL on Windows regardless of the default calling convention of the compiler, so ensure the hooks allow passing those functions directly. */ void *(CJSON_CDECL *malloc_fn)(size_t sz); void (CJSON_CDECL *free_fn)(void *ptr); + void *(CJSON_CDECL *realloc_fn) (void *ptr, size_t new_size, + size_t old_size); } cJSON_Hooks; typedef int cJSON_bool; @@ -285,6 +287,8 @@ CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring) /* malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks */ CJSON_PUBLIC(void *) cJSON_malloc(size_t size); CJSON_PUBLIC(void) cJSON_free(void *object); +CJSON_PUBLIC (void *) +cJSON_realloc (void *object, size_t new_size, size_t old_size); #ifdef __cplusplus }