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

Function cJSON_AddTrueToObject

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

Source from the content-addressed store, hash-verified

1981}
1982
1983CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name)
1984{
1985 cJSON *true_item = cJSON_CreateTrue();
1986 if (add_item_to_object(object, name, true_item, &global_hooks, false))
1987 {
1988 return true_item;
1989 }
1990
1991 cJSON_Delete(true_item);
1992 return NULL;
1993}
1994
1995CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name)
1996{

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