• Home
  • Raw
  • Download

Lines Matching refs:global_hooks

115 static internal_hooks global_hooks = { malloc, free, realloc };  variable
142 global_hooks.allocate = malloc; in cJSON_InitHooks()
143 global_hooks.deallocate = free; in cJSON_InitHooks()
144 global_hooks.reallocate = realloc; in cJSON_InitHooks()
148 global_hooks.allocate = malloc; in cJSON_InitHooks()
151 global_hooks.allocate = hooks->malloc_fn; in cJSON_InitHooks()
154 global_hooks.deallocate = free; in cJSON_InitHooks()
157 global_hooks.deallocate = hooks->free_fn; in cJSON_InitHooks()
161 global_hooks.reallocate = NULL; in cJSON_InitHooks()
162 if ((global_hooks.allocate == malloc) && (global_hooks.deallocate == free)) in cJSON_InitHooks()
164 global_hooks.reallocate = realloc; in cJSON_InitHooks()
193 global_hooks.deallocate(item->valuestring); in cJSON_Delete()
197 global_hooks.deallocate(item->string); in cJSON_Delete()
199 global_hooks.deallocate(item); in cJSON_Delete()
957 buffer.hooks = global_hooks; in cJSON_ParseWithOpts()
959 item = cJSON_New_Item(&global_hooks); in cJSON_ParseWithOpts()
1094 return (char*)print(item, true, &global_hooks); in cJSON_Print()
1099 return (char*)print(item, false, &global_hooks); in cJSON_PrintUnformatted()
1111 p.buffer = (unsigned char*)global_hooks.allocate((size_t)prebuffer); in cJSON_PrintBuffered()
1121 p.hooks = global_hooks; in cJSON_PrintBuffered()
1145 p.hooks = global_hooks; in cJSON_PrintPreallocated()
1804 …cJSON_AddItemToObjectCS(object, (char*)cJSON_strdup((const unsigned char*)string, &global_hooks), … in cJSON_AddItemToObject()
1825 global_hooks.deallocate(item->string); in cJSON_AddItemToObjectCS()
1837 cJSON_AddItemToArray(array, create_reference(item, &global_hooks)); in cJSON_AddItemReferenceToArray()
1842 cJSON_AddItemToObject(object, string, create_reference(item, &global_hooks)); in cJSON_AddItemReferenceToObject()
2002 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateNull()
2013 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateTrue()
2024 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateFalse()
2035 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateBool()
2046 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateNumber()
2072 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateString()
2076 item->valuestring = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); in cJSON_CreateString()
2089 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateRaw()
2093 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); in cJSON_CreateRaw()
2106 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateArray()
2117 cJSON *item = cJSON_New_Item(&global_hooks); in cJSON_CreateObject()
2284 newitem = cJSON_New_Item(&global_hooks); in cJSON_Duplicate()
2295 … newitem->valuestring = (char*)cJSON_strdup((unsigned char*)item->valuestring, &global_hooks); in cJSON_Duplicate()
2303 …N_StringIsConst) ? item->string : (char*)cJSON_strdup((unsigned char*)item->string, &global_hooks); in cJSON_Duplicate()
2619 return global_hooks.allocate(size); in cJSON_malloc()
2624 global_hooks.deallocate(object); in cJSON_free()