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

Function cJSON_AddTrueToObject

contrib/cJSON/cJSON.cpp:1991–2001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1989}
1990
1991CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name)
1992{
1993 cJSON *true_item = cJSON_CreateTrue();
1994 if (add_item_to_object(object, name, true_item, &global_hooks, false))
1995 {
1996 return true_item;
1997 }
1998
1999 cJSON_Delete(true_item);
2000 return NULL;
2001}
2002
2003CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name)
2004{

Callers

nothing calls this directly

Calls 3

cJSON_CreateTrueFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected