MCPcopy Create free account
hub / github.com/esnet/iperf / cJSON_AddBoolToObject

Function cJSON_AddBoolToObject

src/cjson.c:2126–2136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2124}
2125
2126CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean)
2127{
2128 cJSON *bool_item = cJSON_CreateBool(boolean);
2129 if (add_item_to_object(object, name, bool_item, &global_hooks, false))
2130 {
2131 return bool_item;
2132 }
2133
2134 cJSON_Delete(bool_item);
2135 return NULL;
2136}
2137
2138CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
2139{

Callers

nothing calls this directly

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…