Delete a cJSON structure. */
| 77 | |
| 78 | /* Delete a cJSON structure. */ |
| 79 | void cJSON_Delete(cJSON *c) { |
| 80 | cJSON *next; |
| 81 | while (c) { |
| 82 | next = c->next; |
| 83 | if (!(c->type & cJSON_IsReference) && c->child) cJSON_Delete(c->child); |
| 84 | if (!(c->type & cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring); |
| 85 | if (c->string) cJSON_free(c->string); |
| 86 | cJSON_free(c); |
| 87 | c = next; |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | /* Parse the input text to generate a number, and populate the result into item. */ |
| 92 | static const char *parse_number(cJSON *item, const char *num) { |
no outgoing calls
no test coverage detected