| 2119 | } |
| 2120 | |
| 2121 | CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean) |
| 2122 | { |
| 2123 | cJSON *bool_item = cJSON_CreateBool(boolean); |
| 2124 | if (add_item_to_object(object, name, bool_item, &global_hooks, false)) |
| 2125 | { |
| 2126 | return bool_item; |
| 2127 | } |
| 2128 | |
| 2129 | cJSON_Delete(bool_item); |
| 2130 | return NULL; |
| 2131 | } |
| 2132 | |
| 2133 | CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number) |
| 2134 | { |
nothing calls this directly
no test coverage detected