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

Function cJSON_AddNumberToObject

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

Source from the content-addressed store, hash-verified

2017}
2018
2019CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
2020{
2021 cJSON *number_item = cJSON_CreateNumber(number);
2022 if (add_item_to_object(object, name, number_item, &global_hooks, false))
2023 {
2024 return number_item;
2025 }
2026
2027 cJSON_Delete(number_item);
2028 return NULL;
2029}
2030
2031CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string)
2032{

Callers 15

checkPermissionMethod · 0.85
requestCpuHighFreqMethod · 0.85
cancelCpuHighFreqMethod · 0.85
requestGpuHighFreqMethod · 0.85
cancelGpuHighFreqMethod · 0.85
requestHighIOFreqMethod · 0.85
cancelHighIOFreqMethod · 0.85
resetScreenResolutionMethod · 0.85
registerANRCallbackMethod · 0.85

Calls 3

cJSON_CreateNumberFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected