MCPcopy Create free account
hub / github.com/ByConity/ByConity / cJSON_CreateBool

Function cJSON_CreateBool

contrib/cJSON/cJSON.cpp:2295–2304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2293}
2294
2295CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool b)
2296{
2297 cJSON *item = cJSON_New_Item(&global_hooks);
2298 if(item)
2299 {
2300 item->type = b ? cJSON_True : cJSON_False;
2301 }
2302
2303 return item;
2304}
2305
2306CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num)
2307{

Callers 1

cJSON_AddBoolToObjectFunction · 0.85

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected