From 36217e3ca8a1ca2e7a341b6b44ffc25e6497191c Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Fri, 23 Jul 2021 08:51:10 +0000 Subject: api: API trace improvements Type: improvement * add support for JSON format in API trace * add ability to replay JSON API trace in both VPP and VAT2 * use CRC for backward compatibility check during JSON API replay * fix API trace CLI (and remove duplicits) * remove custom dump * remove vppapitrace.py * update docs accordingly Change-Id: I5294f68bebe6cbe738630f457f3a87720e06486b Signed-off-by: Filip Tehlar Signed-off-by: Ole Troan --- src/vppinfra/cJSON.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/vppinfra/cJSON.h') 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 } -- cgit 1.2.3-korg