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

Function cJSON_CreateDouble

cJSON.c:997–1008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

995 return item;
996}
997cJSON *cJSON_CreateDouble(double num, int sign)
998{
999 cJSON *item = cJSON_New_Item();
1000 if (item)
1001 {
1002 item->type = cJSON_Double;
1003 item->valuedouble = num;
1004 item->valueint = (int64)num;
1005 item->sign = sign;
1006 }
1007 return item;
1008}
1009cJSON *cJSON_CreateInt(uint64 num, int sign)
1010{
1011 cJSON *item = cJSON_New_Item();

Callers 6

AddMethod · 0.85
ReplaceMethod · 0.85
AddAsFirstMethod · 0.85
cJSON_CreateIntArrayFunction · 0.85
cJSON_CreateFloatArrayFunction · 0.85
cJSON_CreateDoubleArrayFunction · 0.85

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected