| 2109 | } |
| 2110 | |
| 2111 | CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean) |
| 2112 | { |
| 2113 | cJSON *bool_item = cJSON_CreateBool(boolean); |
| 2114 | if (add_item_to_object(object, name, bool_item, &global_hooks, false)) |
| 2115 | { |
| 2116 | return bool_item; |
| 2117 | } |
| 2118 | |
| 2119 | cJSON_Delete(bool_item); |
| 2120 | return NULL; |
| 2121 | } |
| 2122 | |
| 2123 | CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number) |
| 2124 | { |
nothing calls this directly
no test coverage detected