MCPcopy Create free account
hub / github.com/SVF-tools/SVF / cJSON_AddNumberToObject

Function cJSON_AddNumberToObject

svf/lib/Util/cJSON.cpp:2133–2143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2131}
2132
2133CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
2134{
2135 cJSON *number_item = cJSON_CreateNumber(number);
2136 if (add_item_to_object(object, name, number_item, &global_hooks, false))
2137 {
2138 return number_item;
2139 }
2140
2141 cJSON_Delete(number_item);
2142 return NULL;
2143}
2144
2145CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string)
2146{

Callers

nothing calls this directly

Calls 3

cJSON_CreateNumberFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected