cJSON icon indicating copy to clipboard operation
cJSON copied to clipboard

内存管理中结构体类型名写错了

Open xlu103 opened this issue 11 months ago • 1 comments

image

xlu103 avatar Feb 27 '24 06:02 xlu103

正确应该是:

cJSON_Hooks  *hooks = NULL;
hooks = (cJSON_InitHooks *)my_malloc(sizeof(cJSON_InitHooks));
hooks->malloc_fn = my_malloc;
hooks->free_fn = my_free;
cJSON_InitHooks(hooks);

xlu103 avatar Feb 27 '24 07:02 xlu103