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