• 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()
413 copy = (char*) cJSON_strdup((const unsigned char*)valuestring, &global_hooks); in cJSON_SetValuestring()
1108 buffer.hooks = global_hooks; in cJSON_ParseWithLengthOpts()
1110 item = cJSON_New_Item(&global_hooks); in cJSON_ParseWithLengthOpts()
1250 return (char*)print(item, true, &global_hooks); in cJSON_Print()
1255 return (char*)print(item, false, &global_hooks); in cJSON_PrintUnformatted()
1267 p.buffer = (unsigned char*)global_hooks.allocate((size_t)prebuffer); in cJSON_PrintBuffered()
1277 p.hooks = global_hooks; in cJSON_PrintBuffered()
1281 global_hooks.deallocate(p.buffer); in cJSON_PrintBuffered()
1302 p.hooks = global_hooks; in cJSON_PrintPreallocated()
2046 return add_item_to_object(object, string, item, &global_hooks, false); in cJSON_AddItemToObject()
2052 return add_item_to_object(object, string, item, &global_hooks, true); in cJSON_AddItemToObjectCS()
2062 return add_item_to_array(array, create_reference(item, &global_hooks)); in cJSON_AddItemReferenceToArray()
2072 …return add_item_to_object(object, string, create_reference(item, &global_hooks), &global_hooks, fa… in cJSON_AddItemReferenceToObject()
2078 if (add_item_to_object(object, name, null, &global_hooks, false)) in cJSON_AddNullToObject()
2090 if (add_item_to_object(object, name, true_item, &global_hooks, false)) in cJSON_AddTrueToObject()
2102 if (add_item_to_object(object, name, false_item, &global_hooks, false)) in cJSON_AddFalseToObject()
2114 if (add_item_to_object(object, name, bool_item, &global_hooks, false)) in cJSON_AddBoolToObject()
2126 if (add_item_to_object(object, name, number_item, &global_hooks, false)) in cJSON_AddNumberToObject()
2138 if (add_item_to_object(object, name, string_item, &global_hooks, false)) in cJSON_AddStringToObject()
2150 if (add_item_to_object(object, name, raw_item, &global_hooks, false)) in cJSON_AddRawToObject()
2162 if (add_item_to_object(object, name, object_item, &global_hooks, false)) in cJSON_AddObjectToObject()
2174 if (add_item_to_object(object, name, array, &global_hooks, false)) in cJSON_AddArrayToObject()
2359 replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); in replace_item_in_object()
2378 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateNull()
2389 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateTrue()
2400 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateFalse()
2411 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateBool()
2422 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateNumber()
2448 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateString()
2452 item->valuestring = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); in cJSON_CreateString()
2465 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateStringReference()
2477 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateObjectReference()
2487 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateArrayReference()
2498 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateRaw()
2502 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); in cJSON_CreateRaw()
2515 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateArray()
2526 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateObject()
2710 newitem = cJSON_New_Item(&global_hooks); in cJSON_Duplicate()
2721 … newitem->valuestring = (char*)cJSON_strdup((unsigned char*)item->valuestring, &global_hooks); in cJSON_Duplicate()
2729 …N_StringIsConst) ? item->string : (char*)cJSON_strdup((unsigned char*)item->string, &global_hooks); in cJSON_Duplicate()
3104 return global_hooks.allocate(size); in cJSON_malloc()
3109 global_hooks.deallocate(object); in cJSON_free()