MCPcopy Create free account
hub / github.com/binbyu/Reader / cJSON_CreateBool

Function cJSON_CreateBool

opensrc/cjson/cJSON.c:2281–2290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2279}
2280
2281CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool b)
2282{
2283 cJSON *item = cJSON_New_Item(&global_hooks);
2284 if(item)
2285 {
2286 item->type = b ? cJSON_True : cJSON_False;
2287 }
2288
2289 return item;
2290}
2291
2292CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num)
2293{

Callers 1

cJSON_AddBoolToObjectFunction · 0.85

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected