mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Add cJSON_Allocators new style allocator struct
This commit is contained in:
@ -33,11 +33,11 @@ void reset(cJSON *item) {
|
||||
}
|
||||
if ((item->valuestring != NULL) && !(item->type & cJSON_IsReference))
|
||||
{
|
||||
global_configuration.deallocate(item->valuestring);
|
||||
global_configuration.allocators.deallocate(item->valuestring, global_configuration.userdata);
|
||||
}
|
||||
if ((item->string != NULL) && !(item->type & cJSON_StringIsConst))
|
||||
{
|
||||
global_configuration.deallocate(item->string);
|
||||
global_configuration.allocators.deallocate(item->string, global_configuration.userdata);
|
||||
}
|
||||
|
||||
memset(item, 0, sizeof(cJSON));
|
||||
|
Reference in New Issue
Block a user