MCPcopy Index your code
hub / github.com/DaveGamble/cJSON / cJSON_AddBoolToObject

Function cJSON_AddBoolToObject

cJSON.c:2171–2181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2169}
2170
2171CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean)
2172{
2173 cJSON *bool_item = cJSON_CreateBool(boolean);
2174 if (add_item_to_object(object, name, bool_item, &global_hooks, false))
2175 {
2176 return bool_item;
2177 }
2178
2179 cJSON_Delete(bool_item);
2180 return NULL;
2181}
2182
2183CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
2184{

Calls 3

cJSON_CreateBoolFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…