MCPcopy Create free account
hub / github.com/Wassimulator/CactusViewer / cJSON_CreateBool

Function cJSON_CreateBool

src/cJSON.c:2418–2427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2416}
2417
2418CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool boolean)
2419{
2420 cJSON *item = cJSON_New_Item(&global_hooks);
2421 if(item)
2422 {
2423 item->type = boolean ? cJSON_True : cJSON_False;
2424 }
2425
2426 return item;
2427}
2428
2429CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num)
2430{

Callers 2

save_settingsFunction · 0.85
cJSON_AddBoolToObjectFunction · 0.85

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected