MCPcopy Create free account
hub / github.com/Bwar/CJsonObject / cJSON_CreateInt

Function cJSON_CreateInt

cJSON.c:1009–1020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1007 return item;
1008}
1009cJSON *cJSON_CreateInt(uint64 num, int sign)
1010{
1011 cJSON *item = cJSON_New_Item();
1012 if (item)
1013 {
1014 item->type = cJSON_Int;
1015 item->valuedouble = (double)num;
1016 item->valueint = (int64)num;
1017 item->sign = sign;
1018 }
1019 return item;
1020}
1021cJSON *cJSON_CreateString(const char *string)
1022{
1023 cJSON *item = cJSON_New_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