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