MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / cJSON_CreateBool

Function cJSON_CreateBool

libapp2sys/src/main/cpp/cjson/cJSON.c:2287–2296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2285}
2286
2287CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool b)
2288{
2289 cJSON *item = cJSON_New_Item(&global_hooks);
2290 if(item)
2291 {
2292 item->type = b ? cJSON_True : cJSON_False;
2293 }
2294
2295 return item;
2296}
2297
2298CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num)
2299{

Callers 1

cJSON_AddBoolToObjectFunction · 0.85

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected