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