| 76 | } |
| 77 | |
| 78 | void 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. */ |
| 92 | static cJSON *cJSON_New_Item() |
nothing calls this directly
no outgoing calls
no test coverage detected