MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / cJSON_CreateInt

Function cJSON_CreateInt

common/map_sdk/transmission/src/cJSON.cpp:803–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801 return item;
802}
803cJSON *cJSON_CreateInt(uint64 num, int sign) {
804 cJSON *item = cJSON_New_Item();
805 if (item) {
806 item->type = cJSON_Int;
807 item->valuedouble = static_cast<double>(num);
808 item->valueint = static_cast<uint64>(num);
809 item->sign = sign;
810 }
811 return item;
812}
813cJSON *cJSON_CreateString(const char *string) {
814 cJSON *item = cJSON_New_Item();
815 if (item) {

Callers 3

AddMethod · 0.85
ReplaceMethod · 0.85
AddAsFirstMethod · 0.85

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected