| 2148 | } |
| 2149 | |
| 2150 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2151 | { |
| 2152 | cJSON *string_item = cJSON_CreateString(string); |
| 2153 | if (add_item_to_object(object, name, string_item, &global_hooks, false)) |
| 2154 | { |
| 2155 | return string_item; |
| 2156 | } |
| 2157 | |
| 2158 | cJSON_Delete(string_item); |
| 2159 | return NULL; |
| 2160 | } |
| 2161 | |
| 2162 | CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) |
| 2163 | { |
no test coverage detected
searching dependent graphs…