Delete a cJSON structure. */
| 99 | |
| 100 | /* Delete a cJSON structure. */ |
| 101 | void cJSON_Delete(cJSON *c) |
| 102 | { |
| 103 | cJSON *next; |
| 104 | while (c) |
| 105 | { |
| 106 | next = c->next; |
| 107 | if (!(c->type & cJSON_IsReference) && c->child) |
| 108 | cJSON_Delete(c->child); |
| 109 | if (!(c->type & cJSON_IsReference) && c->valuestring) |
| 110 | cJSON_free(c->valuestring); |
| 111 | if (c->string) |
| 112 | cJSON_free(c->string); |
| 113 | cJSON_free(c); |
| 114 | c = next; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | /* Parse the input text to generate a number, and populate the result into item. */ |
| 119 | static const char *parse_number(cJSON *item, const char *num) |
no outgoing calls
no test coverage detected