MCPcopy Create free account
hub / github.com/Bwar/CJsonObject / cJSON_InitHooks

Function cJSON_InitHooks

cJSON.c:78–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void cJSON_InitHooks(cJSON_Hooks* hooks)
79{
80 if (!hooks)
81 { /* Reset hooks */
82 cJSON_malloc = malloc;
83 cJSON_free = free;
84 return;
85 }
86
87 cJSON_malloc = (hooks->malloc_fn) ? hooks->malloc_fn : malloc;
88 cJSON_free = (hooks->free_fn) ? hooks->free_fn : free;
89}
90
91/* Internal constructor. */
92static cJSON *cJSON_New_Item()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected