• Home
  • Raw
  • Download

Lines Matching refs:global_hooks

186 static internal_hooks global_hooks = { internal_malloc, internal_free, internal_realloc };  variable
214 global_hooks.allocate = malloc; in cJSON_InitHooks()
215 global_hooks.deallocate = free; in cJSON_InitHooks()
216 global_hooks.reallocate = realloc; in cJSON_InitHooks()
220 global_hooks.allocate = malloc; in cJSON_InitHooks()
223 global_hooks.allocate = hooks->malloc_fn; in cJSON_InitHooks()
226 global_hooks.deallocate = free; in cJSON_InitHooks()
229 global_hooks.deallocate = hooks->free_fn; in cJSON_InitHooks()
233 global_hooks.reallocate = NULL; in cJSON_InitHooks()
234 if ((global_hooks.allocate == malloc) && (global_hooks.deallocate == free)) in cJSON_InitHooks()
236 global_hooks.reallocate = realloc; in cJSON_InitHooks()
265 global_hooks.deallocate(item->valuestring); in cJSON_Delete()
269 global_hooks.deallocate(item->string); in cJSON_Delete()
271 global_hooks.deallocate(item); in cJSON_Delete()
418 copy = (char*) cJSON_strdup((const unsigned char*)valuestring, &global_hooks); in cJSON_SetValuestring()
1117 buffer.hooks = global_hooks; in cJSON_ParseWithLengthOpts()
1119 item = cJSON_New_Item(&global_hooks); in cJSON_ParseWithLengthOpts()
1259 return (char*)print(item, true, &global_hooks); in cJSON_Print()
1264 return (char*)print(item, false, &global_hooks); in cJSON_PrintUnformatted()
1276 p.buffer = (unsigned char*)global_hooks.allocate((size_t)prebuffer); in cJSON_PrintBuffered()
1286 p.hooks = global_hooks; in cJSON_PrintBuffered()
1290 global_hooks.deallocate(p.buffer); in cJSON_PrintBuffered()
1311 p.hooks = global_hooks; in cJSON_PrintPreallocated()
2055 return add_item_to_object(object, string, item, &global_hooks, false); in cJSON_AddItemToObject()
2061 return add_item_to_object(object, string, item, &global_hooks, true); in cJSON_AddItemToObjectCS()
2071 return add_item_to_array(array, create_reference(item, &global_hooks)); in cJSON_AddItemReferenceToArray()
2081 …return add_item_to_object(object, string, create_reference(item, &global_hooks), &global_hooks, fa… in cJSON_AddItemReferenceToObject()
2087 if (add_item_to_object(object, name, null, &global_hooks, false)) in cJSON_AddNullToObject()
2099 if (add_item_to_object(object, name, true_item, &global_hooks, false)) in cJSON_AddTrueToObject()
2111 if (add_item_to_object(object, name, false_item, &global_hooks, false)) in cJSON_AddFalseToObject()
2123 if (add_item_to_object(object, name, bool_item, &global_hooks, false)) in cJSON_AddBoolToObject()
2135 if (add_item_to_object(object, name, number_item, &global_hooks, false)) in cJSON_AddNumberToObject()
2147 if (add_item_to_object(object, name, string_item, &global_hooks, false)) in cJSON_AddStringToObject()
2159 if (add_item_to_object(object, name, raw_item, &global_hooks, false)) in cJSON_AddRawToObject()
2171 if (add_item_to_object(object, name, object_item, &global_hooks, false)) in cJSON_AddObjectToObject()
2183 if (add_item_to_object(object, name, array, &global_hooks, false)) in cJSON_AddArrayToObject()
2373 replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); in replace_item_in_object()
2397 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateNull()
2408 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateTrue()
2419 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateFalse()
2430 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateBool()
2441 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateNumber()
2467 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateString()
2471 item->valuestring = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); in cJSON_CreateString()
2484 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateStringReference()
2496 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateObjectReference()
2506 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateArrayReference()
2517 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateRaw()
2521 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); in cJSON_CreateRaw()
2534 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateArray()
2545 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateObject()
2729 newitem = cJSON_New_Item(&global_hooks); in cJSON_Duplicate()
2740 … newitem->valuestring = (char*)cJSON_strdup((unsigned char*)item->valuestring, &global_hooks); in cJSON_Duplicate()
2748 …N_StringIsConst) ? item->string : (char*)cJSON_strdup((unsigned char*)item->string, &global_hooks); in cJSON_Duplicate()
3123 return global_hooks.allocate(size); in cJSON_malloc()
3128 global_hooks.deallocate(object); in cJSON_free()