MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / cJSON_InitHooks

Function cJSON_InitHooks

eval/LANE_evaluation/lane2d/src/cJSON.c:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected