mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
cJSON: Add cJSON_malloc and cJSON_free
This commit is contained in:
10
cJSON.c
10
cJSON.c
@ -2585,3 +2585,13 @@ CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * cons
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
CJSON_PUBLIC(void *) cJSON_malloc(size_t size)
|
||||
{
|
||||
return global_hooks.allocate(size);
|
||||
}
|
||||
|
||||
CJSON_PUBLIC(void) cJSON_free(void *object)
|
||||
{
|
||||
global_hooks.deallocate(object);
|
||||
}
|
||||
|
Reference in New Issue
Block a user